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 |
What are the maximum and minimum sizes of any CONTROL AREA (VSAM datasets) ?
Describe the JOB statement, its meaning, syntax and significant keywords?
What is GDG and what is the maximum limit of versions that can be created?
How do you override a parameter in Positional parameters?
What is the meaning of the EXEC statement keyword, COND? What is its syntax?
What does SYSIN * indicate?
Hi, Say I have 10 flat files and I want to copy all these 10 flat files to a GDG versions flat files (I have GDG base: FDWS01.TEST.RESTORE) in one shot. Can we do that in one shot using a JCL. May be by using IEBGENER. It's a bit urgent. So anyone's fast rely would be appreciated.. Thanks in advance.. 10 flat files ----------------------------------- FDWS01.SUB.RESTORE1 FDWS01.SUB.RESTORE2 FDWS01.SUB.RESTORE3 ; ; FDWS01.SUB.RESTORE10 TO GDG versions ----------------------- FDWS01.TEST.RESTORE.G0001V00 FDWS01.TEST.RESTORE.G0002V00 FDWS01.TEST.RESTORE.G0003V00 ; ; FDWS01.TEST.RESTORE.G0010V00
What is notcat 2 - gs?
Is their any limit for data sets?
WORKING-STORAGE SECTION. 77 W-A PIC 9(3)V99 VALUE 23.75. 77 W-B PIC ZZ9V99 VALUE 123.45. PROCEDURE DIVISION. MOVE W-A TO W-B. DISPLAY W-B. STOP RUN. compiler : IGYGR1080-S A "VALUE" clause literal was not compatible with the data category o subject data item. The "VALUE" clause was discarded. WORKING-STORAGE SECTION. 77 W-A PIC 9(3)V99 VALUE 23.75. 77 W-B PIC ZZ9V99. PROCEDURE DIVISION. MOVE 123.45 TO W-B. MOVE W-A TO W-B. DISPLAY W-B. STOP RUN. 2375
What is the function of a dd statement?
in my jcl have 20 steps step1,step2,.... step20.and i have to execute step1,step2,..and skip the step3 and remaing step4,step5 are execute? i want skip step3 only? what code u can write?