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.
Answers were Sorted based on User's Feedback
Answer / praveen kumar
Anju,,
IN your JCL, where are you using the wrkfile1(step1 output
file) in step2..
does it make any sense...
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / 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 |
My requirement is : How to populate a empty PS/flat file with ONLY spaces in the first line. You should not use any input dataset to do this. I'm not sure whether you may use any utility for this purpose?
what is meant by jobtrac?
Suppose I have seven jobs to do, but I want to hold one than how can I do this?
i want to avoid the positional parameter how to code it ?
What is the difference between specifying DISP=OLD and DISP=SHR for a dataset?
what do you mean By spooling? Expand SPOOL?
difference between internal sort and external sort
Hi, My dataset have multiple records, say 100. I want to start copy records only after a record contain a specific value that may be in a specific position. Secondly I want to stop copying rest records if certain record contains a specific value. Can it be done using SORT/ICETOOL utilities?
hi in one of the interview one asked me how to submit a job from cobol?as well as how to submit a jcl from CICS? can u pls any one tell me..
what is the restart?hopw it is invoked?
Suppose i have 2 steps in my pgm. Step1- creates a file, Step2 - generates report from file in step1, What changes have to be made in Step2, so that if the file in Step1 is empty Step2 should not be executed? No changes to be made to Step1.
How can a job send a status message to a tso user at the completion of a job?