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 |
How I sort the records in a file and copy the first 10 records to another file
wht is sysudump n sysout,sysprint ?
if we are specifing joblib as well as steplib in job then at the time of execution how the process will complete
What is the function of dd name parameter with a 2 part structure; audit.report?
What is the error code SOC01 indicate ?
lines(1,cancel)??What is meant by that??Plz explain it....
Does the terms, JOBLOG, SPOOL and SYSOUT indicate the same thing, i.e., where JCL and JES messages and statements are written ?
how to put a dependency on job in jcl using opc scheduler?
I have a dataset with record length 40 in production, due to some requirements it was changed to 80. Then how can we know the jobs which are effected by this change and how can we resolve it.
How many types of libraries are there in JCL ?
what happens in execution stage in job processing?
What is jcl in mainframe, and how many types of jcl statements are there for a job?