Page 2 of 3

Re: override a specific SYSIN in PROC from a JCL

PostPosted: Wed Apr 18, 2012 7:51 pm
by dn2012
Nick,

I had used PEND. But probably not on right place.
I also took advice of dick and overide as below:

//STEP2.SYSIN DD *

Yes, I am reading mnuals too but some times not every thing you understand correctly on first glance.

Any way thanks for help.

Re: override a specific SYSIN in PROC from a JCL

PostPosted: Wed Apr 18, 2012 8:20 pm
by dn2012
Now I have changed following:
I placed PEND at the end of proc.
I override SYSIN as "//STEP2.SYSIN DD * ". (see below)

//EXTPROC PROC
//STEP1 EXEC PGM=IEFBR14
//SQADB512 DD DSN=&DSNAME,DISP=(NEW,CATLG,DELETE),
// SPACE=(TRK,(5,3,1)),UNIT=SYSDA,
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PO)
//STEP2 EXEC PGM=IDCAMS,REGION=512K
//SYSPRINT DD SYSOUT=*
// PEND
//FINAL EXEC EXTPROC,DSNAME=TSSDN.DEMO.TEMP02,DEFGDG=TSSDN.GDBD.TEMP02
//STEP2.SYSIN DD *
DEFINE GDG( -
NAME(&DEFGDG)-
LIMIT(7) NOEMPTY SCRATCH)
/*
//

But did not run.
TWOSTEP - JOB NOT RUN - JCL ERROR 785

thanks

Re: override a specific SYSIN in PROC from a JCL

PostPosted: Wed Apr 18, 2012 10:28 pm
by NicC
Somewhere in your messages will be actual JCL error message. The message you show is just a 'summary' if you like. Elsewhere will be something which may be DATASET NOT FOUND or SPACE REQUESTED NOT AVAILABLE or a host of any other messages. That message should also indicate which statement is giving the problem. And please continue using code tags. I know they are not easily used in quick reply but if you are doing a quick reply the button for Full Editor is below the input box - a click on that and you have easy access to the Code button - and your reply so far will get carried into the full editor's input area.

In fact I struggled through your code and came up with this...
You have been told that symbolic substitution only works with JCL statements - not data. So, your second symbolic (DEFGDG=......) is wrong. &DEFGDG does not appear in your JCL. It does appear in your data but data is not affected by symbolic substitution. So you only have one &blahblah in your proc but you are supplying 2 on your exec card. 1 does not = 2. Get rid of that second one and in your data supply the full name instead of &DEFGDG

Re: override a specific SYSIN in PROC from a JCL

PostPosted: Thu Apr 19, 2012 4:18 am
by dn2012
that's work.

Thanks

//EXTPROC PROC
//STEP1 EXEC PGM=IEFBR14
//SQADB512 DD DSN=&DSNAME,DISP=(NEW,CATLG,DELETE),
// SPACE=(TRK,(5,3,1)),UNIT=SYSDA,
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PO)
//STEP2 EXEC PGM=IDCAMS,REGION=512K
//SYSPRINT DD SYSOUT=*
// PEND
//FINAL EXEC EXTPROC,DSNAME=TSSDN.DEMO.TEMP02
//STEP2.SYSIN DD *
DEFINE GDG( -
NAME(TSSDN.GDBD.TEMP02)-
LIMIT(7) NOEMPTY SCRATCH)
/*
//


*************************************************************************************
I wonder I need to add following step, what should I do?

//         EXEC PGM=IEBCOPY                                   
//SYSPRINT DD SYSOUT=*                                       
//SYSIN    DD DUMMY                                           
//SYSUT1   DD DISP=SHR,DSN=TSSDN.DATA.COPY2
//SYSUT2   DD DISP=(NEW,CATLG),UNIT=TAPE,DSN=TSSDN.DATA.COPY3
//* 


May be inside the procedure I will write as:
//STEP3   //         EXEC PGM=IEBCOPY                                   
//SYSPRINT DD SYSOUT=*


After the PEND and following:
//FINAL EXEC.............................
//STEP2.SYSIN DD *
....
...

//SYSIN    DD DUMMY                                           
//SYSUT1   DD DISP=SHR,DSN=TSSDN.DATA.COPY2
//SYSUT2   DD DISP=(NEW,CATLG),UNIT=TAPE,DSN=TSSDN.DATA.COPY3


I tried but not work? Why ? Is not same as step 2?

thanks

Re: override a specific SYSIN in PROC from a JCL

PostPosted: Thu Apr 19, 2012 11:26 am
by BillyBoyo
If you want to add another step to a PROC, of course you can.

You can have a step without a stepname.

I don't know if you can put a step without a stepname in a a PROC, I've never tried it.

I don't know if you can override a step without a stepname in a proc, but I doubt it.

You can have all you're DD's in the step in the PROC, and still override them. It does a replacement of the DD in the PROC, rather than an add, which you have achieved so far. Someone looking at the PROC will have more idea of what is going on if it contains all the DD names.

Re: override a specific SYSIN in PROC from a JCL

PostPosted: Thu Apr 19, 2012 12:08 pm
by NicC
Do not say it 'does not work - show us how it does not work. You have shown snippets of JCL which are out of context. Do really have a line thus:
//STEP3   //         EXEC PGM=IEBCOPY
? If you do - look at your messages for that line and look at the manual for the format of an EXEC PGM statement.

Re: override a specific SYSIN in PROC from a JCL

PostPosted: Thu Apr 19, 2012 8:36 pm
by dn2012
thanks

Re: override a specific SYSIN in PROC from a JCL

PostPosted: Thu Apr 19, 2012 10:35 pm
by dn2012
With help of my co worker I was able to accomplish as below:

[color=#0040BF]//EXTPROC PROC                                             
//STEP1        EXEC PGM=IEFBR14                           
//SQADB512 DD  DSN=&DSNAME,DISP=(NEW,CATLG,DELETE),       
//             SPACE=(TRK,(5,3,1)),UNIT=SYSDA,             
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PO)
//STEP2    EXEC PGM=IEBCOPY                               
//SYSPRINT DD SYSOUT=*                                     
//*STEP2.SYSIN DD DUMMY                                   
//SYSUT1   DD DISP=SHR,DSN=TSSDN.DATA.COPY2 <= INPUT TAPE 
//SYSUT2   DD DISP=(NEW,CATLG),UNIT=TAPE,DSN=TSSDN.DATA.COPY3   
//SYSIN    DD DUMMY                                             
//STEP3    EXEC PGM=IDCAMS,REGION=512K                         
//SYSPRINT DD SYSOUT=*                                         
//SYSIN    DD DUMMY                                             
//         PEND                                                 
//FINAL EXEC EXTPROC,DSNAME=TSSDN.DEMO.TEMP02                   
//STEP2.SYSIN DD *                                             
//STEP3.SYSIN DD *                                             
    DEFINE GDG( -                                               
    NAME(TSSDN.GDBD.TEMP02)-                                   
    LIMIT(7) NOEMPTY SCRATCH)                                   
/*                                                             
//                                                    [/color]


What is the function of SYSIN DD DUMMY?
What is difference between SYSIN DD * compare to SYSIN DD DUMMY ?


I think I have been told by one of you to do not use SYSIN DD * in proc.
With DUMMy it does work. Why?

thank you

Re: override a specific SYSIN in PROC from a JCL

PostPosted: Thu Apr 19, 2012 10:38 pm
by NicC
I guess Jennifer is your co-worker or co-student. Look up dummy in the manual. It is all there.

Re: override a specific SYSIN in PROC from a JCL

PostPosted: Thu Apr 19, 2012 10:57 pm
by BillyBoyo
Other formatting does not work in the Code tags. Just the Code tags is fine, otherwise if we copy/paste we have to take out the formatting, which is a waste of time.

The DUMMY allows a DD name to exist without having to have any input/output actually associated with it.

In the case you show it is taking the role of a "placeholder" in the PROC, giving you something to override from your JOB, rather than having to "add" into the step.

The DUMMY has no input, returns EOF when read.

I think almost everyone told you you can't use SYSIN DD * in a cataloged procedure.

DD * indicates that "data cards" follow. In the "old days" these were physical cards, bits of cardboard with holes punched to represent values. You couldn't put physical cards into a catalogued procedure... until recently, long after they have ceased to actually be "physical".