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...

There are two steps in a JCl, the first one generates a
report while the second step send an email saying the
report has been generated, but the second steps should only
be executed when the report file is non-empty. How can it
be acheived. We may include steps in between.

Answer Posted / abhijit18in2002

Insert a IDCAMS step between the two step here is the Eg


//STEP01 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSUT1 DD DSN=MY.SORT.FILE1,DISP=SHR
//SYSUT2 DD DSN=MY.SORT.FILE2,DISP=SHR
//SYSIN DD DUMMY
//*

//* Checking the File for any data
//*

//CHEKEMTY EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//MYFILE DD DSN=MY.SORT.FILE2,DISP=SHR
//SYSIN DD *
PRINT INFILE(MYFILE) CHARACTER COUNT(1)
//*

//* If above step gives RC=04 it means file1 is empty
//* so STEP02 would only execute if step CHEKEMTY has
//* RC Not equal to 04.

//STEP02 EXEC PGM=SASSTRLR,
// PARM='INACT',COND=(04,EQ,CHEKEMTY)
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSIN DD *
DEMAND ABCXYZ
//*

Is This Answer Correct ?    25 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how you can access an uncataloged dataset in a JCL?

1191


Explain how can the disposition of sysout datasets be set for an entire jobstream?

1147


is there any way to execute more than one proc in the same exec statement at the same time..?

2674


Explain the job statement in jcl?

1214


how would you create a temporary dataset? And where will you use them?

1494


What is the job entry system used in your project? based on what criteria the sequence of jobs are picked if priority is not mentioned in the job card?

2343


How to remove the spaces at end of each record in the output file Via COBOL program? note: The file has a VB length ----TRY

1437


what is the compile process of cobol program expalin with code

2644


Explain about LMFREE�free data set from its association with data ID

1675


what is JCL?

1220


List the various advantages of using jcl language?

1518


Explain the function of dd disp parameter?

1173


How to alter the parameters for the existing gdg?

1255


What do you understand by the term “keyword” with respect to jcl and what is the opposite of the term?

1190


How does jcl specify the job to the operating system?

1307