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.

Answers were Sorted based on User's Feedback



There are two steps in a JCl, the first one generates a report while the second step send an email..

Answer / 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

There are two steps in a JCl, the first one generates a report while the second step send an email..

Answer / squid

Just my thought -
You can set a code in your cobol program that writes the
report file to set a certain "return code" in the RETURN-
CODE field before exiting the program.
Depending on that return code from the program, you can
code IF END IF in your JCL.
Please let me know if that is wrong.

Is This Answer Correct ?    6 Yes 2 No

There are two steps in a JCl, the first one generates a report while the second step send an email..

Answer / madhan

Use IEBPTPCH utility to verify the records in the input
file. if you get other than zero return code (2 or 4), then
there is no records in the input file(input file is empty).
based on the return code from the step1, step2 will execute
otherwise skip step2.

Is This Answer Correct ?    1 Yes 3 No

Post New Answer

More JCL Interview Questions

Why we will create load module in PDS only, Why nt in PS?

2 Answers   TCS,


What is jcl in mainframe?

0 Answers  


What is DISP= (NEW,PASS,DELETE)?

3 Answers   HCL,


A chkpt is the parameter coded for multi-volume qsam datasets in a dd statement. When a chkpt is coded as chkpt=eov, a checkpoint is written to the dataset specified in the sysckeov statement at the end of each volume of the input/output multi-volume dataset. State whether true or false?

0 Answers   IBM,


Ques: How can we code COND parameter in a JCL so that only even steps (or only odd steps) get execute??

3 Answers   HSBC,


How dummy is used in jcl?

0 Answers  


Can we write same stepname for one or more steps in on job ?

2 Answers  


How do you create a temporary dataset?

0 Answers  


can u execute a proc from another proc?

5 Answers   Logica CMG,


We have an output dataset in job with disp parameter as SHR. Can we write data in that file dataset?

2 Answers   CTS, IBM,


what does mvs stand for?

1 Answers   IBM,


Must tape dataset definitions include vol=ser specifications?

0 Answers  


Categories