i am trying to copy a PS file into VSAM file in step2 by
using PGM=IDCAMS,COND=(0,LT) and the pS file is getting
sorted in the step1. I got the return code 00 for step1 but
step2 got flushed. can u please help on this. Below is My
JCL.

SEPP050 EXEC
PGM=SORT,REGION=6144K
SYSIN DD DSN=SYSCMN.PROD.CCLIB
(F5910BNN),

DISP=SHR
SYSOUT DD
SYSOUT=*
SYSUDUMP DD
SYSOUT=A
SORTIN DD
DSN=Z1225BT.F5910EPP.HISOUT,

DISP=SHR
SORTOUT DD
DSN=Z1225BT.F5910EPP.HISOUT.SORTOUT5,
DISP=
(NEW,CATLG,DELETE),UNIT=DELQ,
SPACE=(CYL,
(500,500),RLSE),
DCB=
(RECFM=FB,LRECL=1606,BLKSIZE=16060,BUFNO=15)
SORTWK01 DD UNIT=SYSDA,SPACE=(CYL,
(1))
SORTWK02 DD UNIT=SYSDA,SPACE=(CYL,
(1))
SORTWK03 DD UNIT=SYSDA,SPACE=(CYL,
(1))
SORTWK04 DD UNIT=SYSDA,SPACE=(CYL,
(1))
SYSIN1 DD UNIT=VIO,SPACE=
(80,1)
*

SEPP060 EXEC PGM=IDCAMS,COND=
(0,LT)
SYSPRINT DD
SYSOUT=*
SYSOUT DD
SYSOUT=*
SYSLIST DD
SYSOUT=*
***

DD01 DD DSN=Z1225BT.F5910EPP.HISOUT.SORTOUT,
// DISP=SHR
//***
//DD01O DD DSN=Z1225BT.F5910PHS,
// DISP=SHR,
// AMP=(AMORG,'BUFND=12,BUFNI=5')
//SYSIN DD DSN=SYSCMN.PROD.CCLIB(F5910BBB),
//
DISP=SHR



Output RC for the two steps:

SDCBPJ05 SEPP050 00 236 .00 .00 .0
SDCBPJ05 SEPP060 FLUSH 0 .00 .00 .0

Answers were Sorted based on User's Feedback



i am trying to copy a PS file into VSAM file in step2 by using PGM=IDCAMS,COND=(0,LT) and the pS f..

Answer / vs kumar

Do not use the cond code. As per your jcl the second step
is always skipping. Remove the cond code and try it.

Is This Answer Correct ?    1 Yes 0 No

i am trying to copy a PS file into VSAM file in step2 by using PGM=IDCAMS,COND=(0,LT) and the pS f..

Answer / muttaiah

1. cond=(0,lt) is false in this case the sepp060 should
execute. Better don't include cond and try to see what will
happen.
generally this cond parm is so confusing that sometimes we
get much confused whether it will execute when the
condition if true or false.

Is This Answer Correct ?    1 Yes 0 No

i am trying to copy a PS file into VSAM file in step2 by using PGM=IDCAMS,COND=(0,LT) and the pS f..

Answer / srikanth

COND=(0,LT) will not work only if any of the previous steps
ended with a non zero return code(except FLUSH). By
changing the condition to COND=(0,LT,SDCBPJ05)is working
fine.

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More JCL Interview Questions

My JOB contains three steps. //STEP1 EXEC PGM=ABC //STEP2 EXEC PGM=DEF //STEP3 EXEC PGM=GHI My Question is 1) I want to execute second step only. How will do. 2) Soppose U consider above three steps are in PROC steps and I want execute the PROC second step only? How to execute the second step only. During exection time its creating any ABEND? Please let me know..........

2 Answers  


How I sort the records in a file and copy the first 10 records to another file

5 Answers  


How do you run a COBOL batch program from a JCL? How do you run a COBOL/DB2 program?

0 Answers  


Explain about File Tailoring

1 Answers  


what is use of dcb parameter in dd statement?

0 Answers   IBM,






Explain the function of //cntl statement?

0 Answers  


How jcl work to handle various input output file operations?

0 Answers  


Why block size is multiple of lrecl in jcl?

0 Answers  


hi friends........if u know syntax of IEBEDIT IN JCL

2 Answers  


There is a procedure in A.B.PROCS(PROC1) (member name is PROC1) //PROCA... There is a call to a procedure PROCA from a JOB. //STEP01 EXEC PROCA ... Here "PROCA" in JOB refers to the actual PROC name or the member name of the PDS where this PROCA is stored.

2 Answers   Merrill Lynch,


What is the purpose and meaning of the REGION keyword and what JCL statement is it associated with?

3 Answers   IBM,


hi guys what r the diff types of procs in jcl? bye ramya

4 Answers   ACS, Keane India Ltd,


Categories