Page 1 of 2

Backward reference - guidance

PostPosted: Fri Oct 05, 2012 6:31 pm
by gowthamgyaa
Hi everyone,
I used Backward reference to execute two execution steps in jcl statements. If the execution program is of same kind for both the steps(i.e., IEBGENER FOR STEP1 & STEP2)its getting executed, but if i use (IEBGENER FOR STEP1 AND SORT FOR STEP2) , only step1 is being executed.
I'l provide you the statements below, kindly guide me to get knowledge in this.


//JOB STATEMNT
//STEP1 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=******.FINANCE.EMP,DISP=SHR
//SYSUT2 DD DSN=*****.BACK.EMP,DISP=(NEW,CATLG,DELETE),
// SPACE=(TRK,(5,10)),
// DCB=(DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=800)
//SYSIN DD *
/*
//
//STEP2 EXEC PGM=SORT
//SYSPRINT DD SYSOUT=*
//SORTIN DD DSN=*.STEP1.SYSUT1,DISP=SHR
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(5,2,CH,A)
/*
//

Only Step1 i.e., IEBGENER is getting executed , sorting is not getting executed.



RECORDS IN FINANCE.EMP
001 cse 1005
002 ece 1111
008 mec 1007
014 cse 1222
077 aaa 1453
088 sss 1000
015 mmm 1005


Kindly guide me what may be wrong in this.


Kind regards
gyaa

Re: Backward reference - guidance

PostPosted: Fri Oct 05, 2012 6:38 pm
by steve-myers
The // statement after the IEBGENER step implies end of job; the sort step was never in the job.

Re: Backward reference - guidance

PostPosted: Fri Oct 05, 2012 6:45 pm
by gowthamgyaa
Thank you very much for your kind reply steve.
Terribly sorry just now i referred to it, I had just used without // while am executing.
Kindly pardon me and guide me for the knowledge.


Kind regards
gyaa

Re: Backward reference - guidance

PostPosted: Fri Oct 05, 2012 6:47 pm
by enrico-sorichetti
Kindly pardon me and guide me for the knowledge.

why don' t You start reading the manuals ?

Re: Backward reference - guidance

PostPosted: Fri Oct 05, 2012 6:52 pm
by gowthamgyaa
@enrico,
Thank you for your kind reply.
Actually I read the manuals for every try but still facing an error and need some experience hands to give me some knowledge in that.
I hope you had founded the error in that, can you please guide me the same?


Kind regards
gyaa

Re: Backward reference - guidance

PostPosted: Fri Oct 05, 2012 6:59 pm
by NicC
With only 18 lines to check you should have been able to spot the error fairly quickly.

Re: Backward reference - guidance

PostPosted: Fri Oct 05, 2012 7:09 pm
by gowthamgyaa
@Nicc,
In my point of view I guess you saying me about the Input field which i had given where it requires space, but actually there was a space in that still i cant execute it, Kindly pardon me if am wrong and give me some more hints to solve this.

//JOB STATEMNT
//STEP1 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=******.FINANCE.EMP,DISP=SHR
//SYSUT2 DD DSN=*****.BACK.EMP,DISP=(NEW,CATLG,DELETE),
// SPACE=(TRK,(5,10)),
// DCB=(DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=800)
//SYSIN DD *
/*
//STEP2 EXEC PGM=SORT
//SYSPRINT DD SYSOUT=*
//SORTIN DD DSN=*.STEP1.SYSUT1,DISP=SHR
//SORTOUT DD SYSOUT=*
//SYSIN DD *
      SORT FIELDS=(5,2,CH,A)
/*
//


Kind regards
gyaa

Re: Backward reference - guidance

PostPosted: Fri Oct 05, 2012 7:11 pm
by NicC
what does line 10 do? Hint: You have already been told within this thread.

Re: Backward reference - guidance

PostPosted: Fri Oct 05, 2012 7:22 pm
by enrico-sorichetti
why, instead of whining don' t You post the output of Your run, so that we have something to suggest?

imo the initial iebgener is pretty useless

since You read something and write something else
You can just use as input to the sort the original file

Re: Backward reference - guidance

PostPosted: Fri Oct 05, 2012 7:24 pm
by gowthamgyaa
@Nicc,
Thank you for your hints, I got a guidance in the yesterday post that for continuation we have to insert a non-empty character in the line 72, Is it the case nicc?


Kind regards
gyaa