how to split a file

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

I need exexution process for JCL programs

1851


Where can program checkpoints be stored for use in a restart?

851


what is use of space parameter in dd statement?

758


I have a cobol db2 program(PGM A) where other program (PGM B) will call this program and passes some 50 fields data to PGM A. PGM A has some layout in which it receives the data from PGM B. And this layout has been copied in the linkage section pf PGM A. After getting the data, PGM A writes the data in a flat file in the same layout which it receives from PGM B. PGM B is a simple COBOL pgm. Please provide a JCL to run these programs.

1732


What are steplib and joblib? What for they are used?

695






Must tape dataset definitions include vol=ser specifications?

983


How to execute 2nd and 4th steps among 5 steps in jcl proc?

748


How to submit jcl through a cobol program?

679


What are the 4 fields in dd statement?

744


I have a job called careerride and some steps in it as step1,step2. But I want to execute step2 before step1 ? How do I do that?

832


how can a gdg base be created in a jcl. What is the difference between empty and scratch parameter while defining/altering gdg base?

788


Can an individual step be restricted from using all the jobs allowed cpu time?

1009


I have many files which i am receiving from client everyday. I have one step for every file to check for empty or not. Here client gives 30 files i need to check for every file for empty or not and i need to perform 30 steps. Can I do it in single step. Dynamically i need to change the File name in my step.

728


have in 100 records in a file i want to read first 3 records and skip next 3 records and agan i want to read 3 records and again i want to skip 3 records... run a loop from record one to 10 evaluate i/3 if comes even then skip else write to output file

923


Explain how can a stopped job be started again?

636