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
Explain how can values be passed from the job stream to an executable program?
What are the parameters that are used in creating a gdg?
a dd statement has 2 types of parameters. Name them?
Explain the function of a dd statement?
Mention the types of job control statements?
When you specify multiple datasets in a JOBLIB or STEPLIB, what factor determines the order?
What is the difference between the positional and keyword parameters? Give examples.
How jcl is used for testing batch programs?
what EXEC statement is and what is the syntax of EXEC statement used in JCL?
Explain the function of //cntl statement?
Name the statement which can be used to send data to another mvs jes3 node?
Why block size is multiple of lrecl in jcl?
Explain the function of job statement in jcl?
What do we mean by 'Virtual storage' for a dataset and for a JOBSTEP ? What is the significance of the following statement for a programmer 'Virtual storage results in program addresses being independent of the addresses that actually exist in a computer' ?
What is concatenating?