Please go thru the below points and let me know how to code
this.
1. Sort the input dataset for the condition : Starting
position is 37,length of the field is 13 based on character
and in the ascending order , starting from position 25
length of 12 ,character and in the ascending order. Use a
temporary dataset to hold the sorted file.
2. Use the temporary file created in the above step as the
input for the next step. The next step is to execute a
program and produce an output file. Use the temporary file
created in the above as work file 1 and the output of the
file to be created in this step work file 2.Also, pass a
parameter to the program that is to be executed in this
step. The parameter should have the current date in
YYYYMMDD format.
For the sake of convenience, you can use the below
Job Name : Sample1
Input DSN : PCABDT11.CABD.TEST.INPUT
Temporary DSN : Sort1
Output DSN : PCABDT11.CABD.TEST.OUTPUT
Program Name : SAMPLE
Thanks in Advance for your response.
Answer Posted / anju
//step1 exec pgm=sort
//sortin dd dsn= PCABDT11.CABD.TEST.INPUT,disp=shr
//sortout dd dsn=&&sort1, disp=(new,catlg,delete),
// unit=disk, space=(cyl(1,10),rlse),
// dcb=*.sortin
//sysin dd *
sortfields=(37,13,CH,A,25,12,CH,A)
/*
//sysout dd sysout=*
//sysprint dd sysout=*
//step2 exec pgm=sample,parm='2010/11/05'
//wrkfile2 dd dsn=PCABDT11.CABD.TEST.OUTPUT,
// disp=(new,catlg,delete),
// unit=disk, space=(cyl(1,10),rlse),
// dcb=*.sortin
//
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
Is it possible to define dd statements as you want?
what is the compile process of cobol program expalin with code
when can a job time-out occur? How to overcome that?
what is the purpose of coding class parameter in job statement?
What statement can be used to send data to another mvs jes3 node?
How can unused space allocation be returned to the system when a dataset is closed?
what is the JCL statement consists of?
What parameter directs the output of the job log dataset?
how you will the direct the data to spool using sysout option?
which parameter is used to check the syntax of a jcl without executing it?
What do you understand by the terms: joblib and steplib?
If a (+1) generation dataset is created in the first step of a job, how can it be referenced in later steps of the same job for input?
What is the difference between run mode and addressing mode?
What is jcl in mainframe, and how many types of jcl statements are there for a job?
What is the purpose of disp parameter?