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


Please Help Members By Posting Answers For Below Questions

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

659


State the uses of syspring, sysin, sort fields, sum fields and dummy.

641


How to override loadlib?

1410


what is the use of IEBGENER utility?

650


What does a disposition of (MOD,DELETE,DELETE) mean ?

659






In sms datasets, what is the function of the dd avgrec keyword?

645


What is the job entry system used in your project? based on what criteria the sequence of jobs are picked if priority is not mentioned in the job card?

1802


in order to execute step2 a job after a return code of 8 in step1, what condition you will code in step2?

2048


Why include statement is used in a jcl?

681


What does it mean by Restart and Checkpoint in JCL ? How are checkpoints being taken and what is their usage ? How to use Checkpoint macro on a JOBSTEP ?

9205


How to read and write a single record into a file. I would like to use it to enter a single 8-character piece of information and use it to put it into a variable for processing in JCL. Thank you

599


How can an in-stream dataset be terminated?

840


Are there any set of rules for the names of the steps used in a job?

626


Differentiate between the joblib and the steplib statements?

853


I HAVE A VB BLOCK WHICH IS USED AS INPUT IN COBOL CONATINING SOME RECORDS CAN I CHANGE THE FILE FROM VB TO FB?

2091