I have two files each contains 10 records. I would like to
copy both files into one output file but in alternate
sequence. for e.g. first record from file1 then record 2
from file2.....

Answer Posted / mallikharjuna

it will be processed in 3steps
if the data is AAA
AAA
BBB
CCC

FILE2
DDD
EEE
FFF
LIKE 10 RECS

step1:
srt fields=copy
outrec fields=(1:1,3,4:seqnum,4,ZD,START=1,INCR=2 )

STEP:2

step2:
srt fields=copy
outrec fields=(1:1,3,4:seqnum,4,ZD,START=2,INCR=2 )


STEP=3 SORT FIELDS = COPY
OUTREC FIELDS =(1:1,3)

Is This Answer Correct ?    9 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

928


My Question is 1. How to cound no. of records in JCL. Please explain with an example. 2. How to execute only odd steps in JCL? I know EDIT TYPE = Inculde, Step Name = 1,3,5 and COND code for all even step. Anyone knows other than this.

1992


I want to join to input files and write the matching fields on to an output file but i dont want the output file a sorted one

1935


Is it possible to define dd statements as you want?

648


which utility is used a dummy utility?

802






We can use PASS with permanent datasets also. THEN Which is the condition in which we may use PASS (instead of KEEP) with permanent data sets, while there is no need to specify UNIT and VOL for them like temporary data sets (in cas we use KEEP for permanent data sets) ?

1754


in ways data can be passed to a COBOL program from JCL?

674


A chkpt is the parameter coded for multi-volume qsam datasets in a dd statement. When a chkpt is coded as chkpt=eov, a checkpoint is written to the dataset specified in the sysckeov statement at the end of each volume of the input/output multi-volume dataset. State whether true or false?

740


Explain dd statement in jcl?

650


define cond parameter in jcl?

779


Is their any limit for data sets?

709


How to compare two files in SYNCSORT and on the mismatch record should be deleted from second file.

5066


is there any way to execute more than one proc in the same exec statement at the same time..?

2115


Why block size is multiple of lrecl in jcl?

917


what is the resolution for sb37 error

7728