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

Hi, I have 3 files say file A , file B and file C.I want to form an output file in which i will have all the records from file A. Files B and C also may contain records that are present in file A.I want those records also to be included in my output file. for eg: file A contains: 1 2 3 file B contains: 2 4 5 file C contains: 1 3 5 So in my output file should look like: 1 2 3 2 1 3 Can any one help ???.....thanks in advance.

2 Answers  


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

0 Answers  


What will happen if we write two STOP RUN's in a COBOL program?

4 Answers   Satyam,


How do you submit a JCL under CICS environment ?

5 Answers   Wipro,


What are the keywords associated with DCB? How can you specify DCB information? What is the OS precedence for obtaining that DCB information, ie. where does the system look for it first?

2 Answers  


What is the improvement to COND= in the latest version of MVS?

3 Answers  


How to identify in JCL that an input file is empty without reading it?

4 Answers   L&T,


I have GDG defined e.g. GDG.smaplegdg.base, after processing the GDG. it contains some records and which is input to the second step2. How can I use GDG to use it as input file at step2.

3 Answers   Wipro,


how to run batch program without jcl?

3 Answers   HSBC, IBM,


What is a Dummy Utility and what it does ?

3 Answers  


Must tape dataset definitions include vol=ser specifications?

0 Answers  


Is it possible to left uncode disp? If yes, how?

0 Answers  


Categories