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.

Answers were Sorted based on User's Feedback



Suppose i have 2 steps in my pgm. Step1- creates a file, Step2 - generates report from file in step..

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

Suppose i have 2 steps in my pgm. Step1- creates a file, Step2 - generates report from file in step..

Answer / sreedhar naidu dhekodna

In the above Question there are no details about how the
file is getting created say, whether they are creating a
file using a program which may or may not populate data
into the file or using some IBM utilities for the sake of
only creation of file.

Consider the first Case: If file is getting created in a
step where the program may or maynot populate the file,

Then we can use IDCAMS or INSYNC or FILEAID or some
other utilities to check the emptiness of a file.

If it is the other case: Using file creation utilities only
for the sake of creation then only we can use cond
parameter.

Is This Answer Correct ?    1 Yes 1 No

Suppose i have 2 steps in my pgm. Step1- creates a file, Step2 - generates report from file in step..

Answer / vinay sonar

If file is empty you will get return code 4.
So put always true confition COND=(4,EQ) in step2.

Is This Answer Correct ?    1 Yes 2 No

Suppose i have 2 steps in my pgm. Step1- creates a file, Step2 - generates report from file in step..

Answer / reader

when we are creating the file in step-1 then obviuosly the
file will be empty only..then why we need to check the
condition and skip the step..directly we can put COND=
(4,Lt) parameter and we can skip the step-2...

correct me if im wrong...

Is This Answer Correct ?    5 Yes 14 No

Post New Answer

More JCL Interview Questions

What is the purpose and meaning of the TIME keyword and what JCL statement is it associated with?

1 Answers  


What is jcl in mainframe, and how many types of jcl statements are there for a job?

0 Answers  


how do u define a file in cobol and jcl ?

2 Answers   TCS,


what is the difference between return code and maxcc?

2 Answers   iGate,


What all are the changes to be made in JCL so as to do testing?

2 Answers   TCS,


How to ALTER the name of a GDG ?

2 Answers   IBM,


how to have variable length record in outrec..i have the requmt as follows.. i/p file variable lenght record output file : i need to alter the input and write into outrec(another file) sort fields: copy from(dd1) using ctl1 ctl1cntl dd * outfil fnames=xxx, outrec=(1,131) here i outrec is bombing with error..how to overcome this defect...???

1 Answers  


Explain the function of //cntl statement?

0 Answers  


Can a PS file be read in reverse order?If so,how

2 Answers   Syntel,


How to read and write a single record into a file. I would like to use it to enter a single 8-character piece of information and use it to put it into a variable for processing in JCL. Thank you

0 Answers  


How much space OS allocates when you create a PS or PDS?

4 Answers  


I have a cobol db2 program(PGM A) where other program (PGM B) will call this program and passes some 50 fields data to PGM A. PGM A has some layout in which it receives the data from PGM B. And this layout has been copied in the linkage section pf PGM A. After getting the data, PGM A writes the data in a flat file in the same layout which it receives from PGM B. PGM B is a simple COBOL pgm. Please provide a JCL to run these programs.

0 Answers  


Categories