how to split a file
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
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 |
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?
what is XSUM in some fields= none, xsum ??
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?
What does IEBGENER do?
In how ways you can pass the data from Jcl to cobol ?
What is use of restart and how to use it?
wht do u mean by inrec and outrec ?
How gdg are concatenated?
wt will happen to the step of a job if u code COND=ONLY
in order to execute step2 a job after a return code of 8 in step1, what condition you will code in step2?
In JCL I have 5 steps,I need to execute 1st,2nd and 5th steps only,can any one answer me please?
Suppose I have a program in cobol name ”careerride” and want to execute the program by jcl. Specify the process?