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 |
Explain the purpose of the dd keylen parameter?
How many positional parameters are there in job statement?
can we modify the code in copy book? if it possible how to submit ofter the modification.
if we give TIME=0 how many sec that job/step
what is the Difference between SYSIN and PARM ?
how to run batch program without jcl?
What is a GDG? Why do we go for a GDG ? utility used to create GDG?
Can an individual step be restricted from using all the jobs allowed cpu time?
what is alternate index?
when GDG version number get changed ? bcz always Generations only increasing.
The disp in the JCL is MOD and the program opens the file in OUTPUT mode. What happens ? The disp in the JCL is SHR and the pgm opens the file in EXTEND mode. What happens ?
i have a jcl containing header body and trailer .in header i have viswa body 2 6 1 9 7 trailer reddy .now i need to sort only body in either asecending or descending order how can i do it