Sponsored Content
Top Forums Shell Programming and Scripting To check if the latest version of given GDG base has data Post 302268625 by mavesum on Tuesday 16th of December 2008 03:52:19 AM
Old 12-16-2008
To check if the latest version of given GDG base has data

Hi All ,

I am trying to run a shell script through a JCL . The requirement is I have a gdg base name and I need to create a script that will just check if the latest version of that gdg has data or not . If it doesnt have data RC 4 need to be returned . One more thing which is bothering me is i need to pass a parameter from the JCL to that script that will be appended at the end of the file . Let me be more clear .

Suppose the file name is PRODGA.GL.DTL&PARM

This would be the JCl :

Code:
 
//SD138110 JOB ('ACCT000000','SUMIT'),MSGLEVEL=(1,1),
// CLASS=0,MSGCLASS=X
//*******************************************************************
//* CHECKS FOR THE EXISTENCE OF GDG *
//*******************************************************************
//STEP01 EXEC PGM=GDGCHK,PARM='TEST'
//SYSPRINT DD SYSOUT=X
//SYSTSPRT DD SYSOUT=*
//*

So the Script needs to check for the file PRODGA.GL.DTLTEST_00 (latest version) for the data ....something like

Code:
 
#!/bin/ksh
 
$a = "PRODGA.GL.DTL$PARM_00" /// syntax would be changed 
echo "$a" //// jus for checking if PRODGA.GL.DTL$PARM is getting converted to PRODGA.GL.DTLTEST
if [ ! -s $a ];then
echo "**** ERROR - FILE EMPTY ****"
exit 4
fi;
exit

Any sort of help is appreciated and pls let me know if i can provide you guys with some more details which might be needed here.

Thanx in advance ,
Sumit
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Downloading vs buying latest version of os

I am currently taking a Unix programming class in school, I want ot know which is more efficient and quicker, downloading the os or buying the os (4 Replies)
Discussion started by: lavonte
4 Replies

2. UNIX for Dummies Questions & Answers

What is the latest version of Unix?

I want to buy it (2 Replies)
Discussion started by: LANSTARR.COM
2 Replies

3. Shell Programming and Scripting

Latest version of a file across the servers ..

:o How do I confirm that the script on one server is latest compare to other servers? Is there any script which can tell me the latest version of a file across the servers? Thanks, (2 Replies)
Discussion started by: Sandy
2 Replies

4. Shell Programming and Scripting

Using loop reading a file,retrieving data from data base.

Hi All, I am having trouble through, I am reading the input from tab delimited file containing several records, e.g. line1 field1 field2 field3 so on.. line2 field1 field2 field3 so on.. .. .. on the basis of certain fields for each record in input file, I have to retrieve... (1 Reply)
Discussion started by: Sonu4lov
1 Replies

5. UNIX for Dummies Questions & Answers

To check if the latest version of given GDG base has data

Hi All , I am trying to run a shell script through a JCL . The requirement is I have a gdg base name and I need to create a script that will just check if the latest version of that gdg has data or not . If it doesnt have data RC 4 need to be returned . One more thing which is bothering me is i... (1 Reply)
Discussion started by: mavesum
1 Replies

6. BSD

latest version of bsd

Any body there ? What is latest BSD version ? (4 Replies)
Discussion started by: chilaka
4 Replies

7. AIX

Latest firmware version for P770

Dears i have a power7 P770 working in AIX 5.3 TL 11 with frimware AM730_066 is the AM730_066 frimware the latest one or not ? (6 Replies)
Discussion started by: thecobra151
6 Replies

8. Shell Programming and Scripting

Combine data from two files base on uniq data

File 1 ID Name Po1 Po2 DD134 DD134_4A_1 NN-1 L_0_1 DD134 DD134_4B_1 NN-2 L_1_1 DD134 DD134_4C_1 NN-3 L_2_1 DD142 DD142_4A_1 NN-1 L_0_1 DD142 DD142_4B_1 NN-2 L_1_1 DD142 DD142_4C_1 NN-3 L_2_1 DD142 DD142_3A_1 NN-41 L_3_1 DD142 DD142_3A_1 NN-42 L_3_2 File 2 ( Combination of... (1 Reply)
Discussion started by: pareshkp
1 Replies

9. Ubuntu

How can i get libatlas-base-dev version?

Hello, Please i have installed libatlas-base-dev on my Ubuntu Trusty Tahr: sudo apt-get install libatlas-base-dev Which command can i use to get the version of the library installed ? Thanks a lot. Best Regards. (2 Replies)
Discussion started by: chercheur111
2 Replies

10. Solaris

Solaris 11 SRU latest version

Hi During a host review session I was told to check if the engineers have been updating Solaris 11 OS regularly by verifying the SRU version of the system. However i was having no luck in finding the latest SRU version number in oracle website for hours. I wonder did anyone here know where i... (4 Replies)
Discussion started by: kaze
4 Replies
DT2DV(1)						      General Commands Manual							  DT2DV(1)

NAME
dt2dv - convert a DTL text representation of a TeX DVI file to a binary DVI file SYNOPSIS
dt2dv [-debug] [-group] [-si] [-so] [input-DTL-file] [output-DVI-file] In the absence of the -si and -so options, both file arguments are required in the order input-DTL-file output-DVI-file . But also see the OPTIONS section below. No default file extensions are supplied. DESCRIPTION
dt2dv converts a text representation of a TeX DVI file, usually produced by the companion dv2dt(1) utility, back to a binary DVI file. DTL (DVI Text Language) files can be edited, with care, and then restored to DVI form for processing by any TeX DVI driver program. In DTL files, font directory names and font names are preceded by a length field, which must be updated if the names are modified. dvitype(1) can also display a textual representation of DVI files, but in some implementations at least, it cannot be used in batch mode, and its output is not well-suited for conversion back to a DVI file. The format of TeX DVI files is fully described in Donald E. Knuth, TeX: The Program, Addison-Wesley (1986), ISBN 0-201-13437-3, as well as in the dvitype(1) literate program source code. Brief descriptions of the DTL and DVI formats are given in dv2dt(1). OPTIONS
-debug Turn on detailed debugging output. -group Expect each DTL command to be in parentheses. -si Read all DTL commands from standard input. -so Write all DVI commands to standard output. SEE ALSO
dv2dt(1), dvitype(1), tex(1). FILES
*.dvi binary TeX DVI file. *.dtl text representation of a TeX DVI file in DVI Text Language format. AUTHOR
dt2dv and dv2dt(1) were written by Geoffrey Tobin Department of Electronic Engineering La Trobe University Bundoora, Victoria 3083 Australia Tel: +61 3 479 3736 FAX: +61 3 479 3025 Email: <G.Tobin@ee.latrobe.edu.au> These manual pages were written primarily by Nelson H. F. Beebe, Ph.D. Center for Scientific Computing Department of Mathematics University of Utah Salt Lake City, UT 84112 Tel: +1 801 581 5254 FAX: +1 801 581 4148 Email: <beebe@math.utah.edu> Version 0.6.0 08 March 1995 DT2DV(1)
All times are GMT -4. The time now is 11:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy