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

What is notcat 2 - gs?

941


Is condition checking possible in jcl? If yes, how?

739


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

2113


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

668


1) SORT FIELDS=(20,4,CH,D,10,3,CH,D) OUTREC FIELDS=(7:20,4,C' FUTURE ',20,2,10,3,1Z,1,9,13,7, 24,57,TRAN=LTOU,6X'FF') This example illustrates how a fixed-length input data set can be sorted and reformatted for output. The SORTIN LRECL is 80 bytes. The reformatted output records are fixed length with a record size of 103 bytes. SOLRF (the IBM-supplied default) is in effect, so unless the SORTOUT LRECL is specified or available, it will automatically be set to the reformatted record length of 103. in the above example i have some doubts that a) sort fields=(20,4,CH,D,10,3,CH,D) -what exactly it does and this fields related to output record fields or input record fields b)outrec used to refprmat the records after sorting that means could please reply me as soon as possible Thanks. Venkat

7093






Hello Guys, I have 1+ Year Experience in MAINFRAME TESTING. After 1 Week I have an Interview With a Company on Mainframe Testing. Please Could You Guys Please Suggest me What Sections Should I prepare ?? ___Tell Me the Topic Or Appropriate Site & Links. ?? ---------------Thank You

2269


how you can access an uncataloged dataset in a JCL?

656


List the different components of jcl statement?

700


how to do automated restart when a job abends?

854


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

614


What is the difference between the positional and keyword parameters? Give examples.

716


Is it possible to define dd statements as you want?

646


how can you check if a file is empty using jcl?

816


Explain about LMFREE�free data set from its association with data ID

1010


Where can program checkpoints be stored for use in a restart?

851