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


In one of intervie, my interviwer asked, I have a file
which contains 4 records I would like to split the 4
different outputs for each record how to do?

Answers were Sorted based on User's Feedback



In one of intervie, my interviwer asked, I have a file which contains 4 records I would like to sp..

Answer / sachin

above answer is partially correct
use below syntax i have already performed this code
in our application.

//S1 EXEC PGM=SORT
//SORTIN DD DSN=INPUT FILE,DISP=SHR
//DD01 DD DSN =O/P1
//DD02 DD DSN =O/P2
//DD03 DD DSN =O/P3
//DD04 DD DSN =O/P4
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FNAMES=(DD01,DD02,DD03,DD04),SPLIT

Is This Answer Correct ?    0 Yes 0 No

In one of intervie, my interviwer asked, I have a file which contains 4 records I would like to sp..

Answer / amruta

you can use (if then do output options) conditional logic
statements.

Is This Answer Correct ?    0 Yes 0 No

In one of intervie, my interviwer asked, I have a file which contains 4 records I would like to sp..

Answer / muttiah

I'm not sure about the answers posted.But you can try this
simple JCL to achieve what you want.

//JOBCARD /*As per your company standard*/
//STEP1 EXEC PGM=SORT
//Sortin DD DSN=<Inputfile>,disp=shr
//SORT0F01 DD DSN=<FILENM1>,DISP=OLD
//SORT0F02 DD DSN=<FILENM2>,DISP=OLD
//SORT0F03 DD DSN=<FILENM3>,DISP=OLD
//SORT0F04 DD DSN=<FILENM4>,DISP=OLD
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY OR SORT FIELDS=COPY
OUTFIL FILES=01,STARTREC=1,ENDREC=1
OUTFIL FILES=02,STARTREC=2,ENDREC=2
OUTFIL FILES=03,STARTREC=3,ENDREC=3
OUTFIL FILES=04,STARTREC=4,ENDREC=4
/*
//

NOTE: I have given DISP=OLD which means it will override
the contents when you submit the jcl
If you want to create a new dataset replace like this
EX:
//SORT0F04 DD DSN=<FILENM4>,DISP=(NEW,CATLG,DELETE),
// SPACE=(TRK,(1,4)),DCB=*.SORTIN


Hope this makes sense!!

Is This Answer Correct ?    0 Yes 0 No

In one of intervie, my interviwer asked, I have a file which contains 4 records I would like to sp..

Answer / chandan

You need to use ICETOOL utility and with Case statment. Pl
find the answer from ICETOOL pdf manual and test it.

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More JCL Interview Questions

//ERFDS JOB //STEP1 //STEP2 //STEP3...COND=(4,LT) //STEP4 1.CONDITION IN STEP3 REFERS TO WHICH STEP'S RETURN CODE (STEP1 OR STEP2)? 2.IN ABOVE PROGRAM IF CONDITION SATISFIES IN STEP3 WHICH STEPS WILL EXECUTE?? AND WHY? IF CONDITION IN STEP3 SATISFIES

5 Answers   IBM,


1.How to check for the errors using TYPRUN=SCAN?What will be the output if we give TYPRUN=SCAN?

11 Answers  


if we compile the cobol+ db2 program now ofter 5 years we need to compile again?

1 Answers   TCS,


how will be submit 1 jcl by other jcl? means that how 'll submit one job by other job??

3 Answers   Steria,


what happens if job falls in loop ? how to resolve it ?

3 Answers   Patni,


I have 2 steps in my exec statement , in first step I am creating a gdg, and the output of this step is going into second step as a input, and this second step is abended , now how could i approach in this case.

5 Answers   Bank Of America,


hi guys what r the diff types of procs in jcl? bye ramya

4 Answers   ACS, Keane India Ltd,


I have 255 procedures in a job, each procedure contain 2 steps.can we execute this job?

2 Answers  


How much is memory space involved, when we code BLOCKSIZE,TRK & CYL ?

1 Answers  


What is the difference between sb37,se37,sd37 each?

9 Answers   TCS,


what is force complete

2 Answers   IBM,


How to execute 2nd and 4th steps among 5 steps in jcl proc?

0 Answers  


Categories