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

Are there any set of rules for the names of the steps used in a job?

0 Answers  


when GDG version number get changed ? bcz always Generations only increasing.

1 Answers   Cap Gemini,


how can we override data definitions in jcl. can any one give detailed example

3 Answers   TCS,


Does the terms, JOBLOG, SPOOL and SYSOUT indicate the same thing, i.e., where JCL and JES messages and statements are written ?

2 Answers  


WHAT IS DUMMY IN JCL? HOW TO USE IT? CAN ANYBODY SEND PROGRAM ON THIS?

3 Answers  


Explain about LMMLIST�list a library's members

1 Answers  


IN MY JCL I VE 8 STEPS I WANT TO EXCUTE STEP 8 FIRST THEN EXCUTE STEP 4 ,HOW WILL EXCUTE STEP 8 BEFORE STEP 4?

7 Answers   Cognizant, IBM, IGT,


how do u define a file in cobol and jcl ?

2 Answers   TCS,


I have 15 flat files. each record in the files have the monthly salary for 12 months with the employee number. Now I want to concatenate the 15 files such that for the employee numbers that are common the o/p file should have only one record and the salaries should be concatenated to that record. How can we do it with JCL?

1 Answers  


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

9 Answers   TCS,


how do you resolve for soc7 error

6 Answers   ACS, iGate,


how to split a file

4 Answers   IBM,


Categories