Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Suppose i have 2 steps in my pgm. Step1- creates a file,
Step2 - generates report from file in step1, What changes
have to be made in Step2, so that if the file in Step1 is
empty Step2 should not be executed? No changes to be made to
Step1.

Answer Posted / reddy

After step1,before step2 , create another step , say stepA.

in step a , cheCk for the file in step1 is empty or not
using the IDCAMS utility

//STEP1 EXEC PGM=PG1
//DD1 DD DSN=TPAR.T01.A,DISP=(NEW,CATLG,DELETE),
DCB=(RECFM=FB,LRECL=80,BLKSIZE=800),
SPACE=(TRK,(5,5),RLSE),UNIT=PROD
//STEPA EXEC PGM=IDCAMS
//DD2 DD DSN=TPAR.T01.A,DISP=SHR
//SYNID DD *
PRINT INFILE(DD2) COUNT (1)
END
//IF (RC.STEPA = 4) THEN
//STEP2 EXEC PGM=REPORT
//DD3 DD DSN = XXX.XX.XX
//ELSE
//STEP3 EXEC PGM=PGM2
//ENDIF


if the file is empty , stepa will return 0 else it
reuns 4. If your file consists of the header and trailer
give count(3).

Is This Answer Correct ?    20 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Where can program checkpoints be stored for use in a restart?

1418


Explain how can the submitting users racf authority be overridden in a job stream?

1113


Is their any limit for data sets?

1168


what is the use of IEBGENER utility?

1151


Is automatic restart possible in jcl? If yes, how?

1103


How can unused space allocation be returned to the system when a dataset is closed?

1472


What is the maximum length of a single line of jcl?

1339


Many jcl statements contain specific values designed to direct and control the execution of the statement. What are these fields called?

1208


For what purpose steplib and joblib are used ?

1124


How jcl work to handle various input output file operations?

1135


What are s0c1, s0c4, s0c5, s0c7 and socb?

1155


Explain the purpose of dd dummy statement?

1199


Explain in DD statement what is the use of DCB parameter?

1118


what sort card you will use to copy the data from one dataset to another dataset?

1192


Explain about LMQUERY�give a dialog information about a data set

1428