how to split a file

Answers were Sorted based on User's Feedback



how to split a file..

Answer / himanshu

Using SORT utility we can split the file. Sort card will be
as:

//SYSIN DD *
SORT FIELDS=COPY
OUTFILE FNAMES=(SORTOUT1,SORTOUT2,SORTOUT3),SPLIT
/*

If there are 10 records in input and these have to be split
across three files SORTOUT1, SORTOUT2 and SORTOUT3
respectively. After running the Job using this sort card,
record1 would be stored in SORTOUT1, record2 in SORTOUT2,
record3 in SORTOUT3, record4 in SORTOUT1 and so on.

Is This Answer Correct ?    18 Yes 0 No

how to split a file..

Answer / thavasi

USE ICETOOL to split the records from a single file into two
output files. Do a search in google, you will get lot of
ICETOOL JCL for this requirement.

Thanks,
Thavasi

Is This Answer Correct ?    5 Yes 4 No

how to split a file..

Answer / shubhanshu sharma

//SORT01 DD DSN = PDS,
DISP = (NEW,CATALOG,DELETE),
DCB = (RECFM = F, LRECL = 80, BLKSIZE = 800),
UNIT = SYSDA,
VOL = WRKA97
SPACE = (CYL,(1,4),RLSE)

//SORTIN DD*
SORTFIELD = COPY,
SKIPREC = 100,
STOPREC = 80.
/*
SKIPREC means how many records we need to skip
STOPAFT means how many records we need to put in the
file.

Is This Answer Correct ?    1 Yes 3 No

how to split a file..

Answer / kalpana

Using the sort card we can split the file.
//SYSIN DD *
SORT FIELDS=COPY,SKIPREC=56910,STOPAFT=25
/*
SKIPREC means how many records we need to skip and STOPAFT
means how many records we need to put in the
file.

Is This Answer Correct ?    5 Yes 10 No

Post New Answer

More JCL Interview Questions

Hi, all suppose i have 5 steps (S1,S2,S3,S4,S5) what will happen if cond is true or false (which of the other steps get executed)? 1) //s3 exec pgm=abc,cond=(0,le) 2) //s3 exec pgm=abc,cond=(0,le,step2) 3) In the jobcord RESTART=step3,cond=(0,le) 4) can i code COND=TRUE in jobcard, if yes what will happen?

3 Answers   TCS, Tech Mahindra,


what is XSUM in some fields= none, xsum ??

7 Answers   Xansa,


if in a job, region is mentioned in both jobcard and in step then which is cosidered at the step level? A job has region 4k in jobcard and step1 with region 0k and step2 with 16k, then what is the region allocated for the entire job? what is the region step1 takes? what is the region step2 takes?

4 Answers  


What does IEBGENER do?

10 Answers   BirlaSoft,


In how ways you can pass the data from Jcl to cobol ?

3 Answers   Cap Gemini, IBM,






What is use of restart and how to use it?

0 Answers  


wht do u mean by inrec and outrec ?

1 Answers   IBM,


How gdg are concatenated?

0 Answers  


wt will happen to the step of a job if u code COND=ONLY

5 Answers   ADP,


in order to execute step2 a job after a return code of 8 in step1, what condition you will code in step2?

0 Answers   IBM,


In JCL I have 5 steps,I need to execute 1st,2nd and 5th steps only,can any one answer me please?

2 Answers   TCS,


Suppose I have a program in cobol name ”careerride” and want to execute the program by jcl. Specify the process?

0 Answers  


Categories