how to split a file

Answers were Sorted based on User's Feedback



how to split a file..

Answer / himanshu

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

how to split a file..

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

how to split a file..

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

how to split a file..

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

Post New Answer

More JCL Interview Questions

Explain the purpose of the dd keylen parameter?

0 Answers  


How many positional parameters are there in job statement?

4 Answers  


can we modify the code in copy book? if it possible how to submit ofter the modification.

3 Answers   IBM, L&T,


if we give TIME=0 how many sec that job/step

13 Answers  


what is the Difference between SYSIN and PARM ?

5 Answers   IBM,






how to run batch program without jcl?

3 Answers   HSBC, IBM,


What is a GDG? Why do we go for a GDG ? utility used to create GDG?

3 Answers   Xansa,


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

0 Answers  


what is alternate index?

1 Answers  


when GDG version number get changed ? bcz always Generations only increasing.

1 Answers   Cap Gemini,


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 ?

0 Answers  


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

1 Answers   L&T,


Categories