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



Please go thru the below points and let me know how to code this. 1. Sort the input dataset for t..

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

Please go thru the below points and let me know how to code this. 1. Sort the input dataset for t..

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

Post New Answer

More JCL Interview Questions

What is primary allocation for a dataset?

4 Answers  


whats SOC7?

1 Answers   Patni,


Suppose there r 10 steps . Out fo which i want to execute 10th, 9th and 8th in reverse order without using IEBEDIT. How can i do that..???

5 Answers   IBM, UST,


I have mainpgm(abc) this is the only cobol pgm(non-db2).And this pgm calling subpgm name "acd" this also only cobol(non- Db)and this pgm calling some other subpgm this pgm has cobol-db2 pgm. 1) IF you calling static mode how to run and how to compile? 2) IF you calling dynamic mode how to run and how to compile? plz suggestion me.

0 Answers   HP,


File1 has 100 records and file2 has 200 records i want to copy 50 records which r in both file into file3

7 Answers  






How do you access a file that had a disposition of KEEP?

3 Answers  


What is the purpose of dd dummy statement?

0 Answers  


if you have big pgm. during compilation is abends with (soc7)how do you know which line has soc 7 error.

4 Answers   IBM,


How to rename a VSAM file as well as it's index file?

4 Answers   CitiGroup,


What is default if we don't specify RD parameter at all ?

1 Answers   IBM,


A chkpt is the parameter coded for multi-volume qsam datasets in a dd statement. When a chkpt is coded as chkpt=eov, a checkpoint is written to the dataset specified in the sysckeov statement at the end of each volume of the input/output multi-volume dataset. State whether true or false?

0 Answers   IBM,


In a JCL if previous steps return code is greater than 0 or 4 then the next step will not execute. But the job will be successfull with the maximum return code. How can we reset this maximum return code to '0' regardless of return codes of any steps?

4 Answers  


Categories