Write a JCL by using the below requirement:
File1 =1, File2 =11 and output needs to come as File3 =111?
Answer Posted / sathish kumar chandra sekaran
//D362967J JOB (UBS-UBS-D362967-XXX-999),CLASS=C,
// MSGCLASS=X,MSGLEVEL=(1,1),NOTIFY=D362967
//STEP1 EXEC PGM=SORT
//SORTIN DD *
1
/*
//SORTOUT DD DSN=D362967.TEST.PS3,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSDUMP DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
OUTREC FIELDS=(1:1,8,60:SEQNUM,3,ZD,START=1,INCR=2)
/*
//STEP2 EXEC PGM=SORT
//SORTIN DD *
11
/*
//SORTOUT DD DSN=D362967.TEST.PS4,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSDUMP DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
OUTREC FIELDS=(1:C'1',2:1,8,60:SEQNUM,3,ZD,START=2,INCR=2)
/*
//STEP3 EXEC PGM=SORT
//SORTIN DD DSN=D362967.TEST.PS3,DISP=SHR
// DD DSN=D362967.TEST.PS4,DISP=SHR
//SORTOUT DD DSN=D362967.TEST.PS5,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSDUMP DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(60,3,CH,A)
/*
//STEP4 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=D362967.TEST.PS5,DISP=SHR
//OUT1 DD SYSOUT=*
//TOOLIN DD *
SPLICE FROM(IN1) TO(OUT1)-
ON(1,1,CH) KEEPNODUPS WITH(2,2)
/*
This will meet your requirement.
Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
How to override a dsn that is contained in a proc called by another proc? I need to do the override in the calling jcl?
I need exexution process for JCL programs
Explain how can a jobs execution priority be modified?
List the various advantages of using jcl language?
Can I share my data with other jobs? How?
What are the 2 types of parameters in dd statement?
Can an individual step be restricted from using all the jobs allowed cpu time?
Explain the function of dd name parameter with a 2 part structure; audit.report?
Define concatenating?
Why include statement is used in a jcl?
What are the parameter we cannot use in procedure?
Is automatic restart possible in jcl?
Explain the function of dd disp parameter?
What is the significance of addrspc parameter in exec statement?
Explain about ISPF/TSO Commands