Page 3 of 3

Re: override a specific SYSIN in PROC from a JCL

PostPosted: Fri Apr 20, 2012 12:09 am
by dn2012
It's work but I have noticed following message in the output file

IGD17101I DATA SET TSSDN.DATA.COPY3 421
NOT DEFINED BECAUSE DUPLICATE NAME EXISTS IN CATALOG
RETURN CODE IS 8 REASON CODE IS 38 IGG0CLEH

Re: override a specific SYSIN in PROC from a JCL

PostPosted: Fri Apr 20, 2012 12:17 am
by dn2012
I removed SYSIN DD DUMMY from the proc (as every one said earlier) and its work fine.
I will try to use substitute varibale in step 2 also.

Re: override a specific SYSIN in PROC from a JCL

PostPosted: Fri Apr 20, 2012 12:22 am
by BillyBoyo
OK, first thing to recognise is that it didn't work.

You probably got a non-zero return-code with this, as well.

This is one of those times when the answer is obvious without looking up the message.

Either by accident or without you realising it, you have previously run the step successfully and cataloged your dataset (note, this has nothing to do with cataloged procedures, just because the word is the same).

To get the step to run correctly, you have to delete that dataset.

First step though, is to say "my step didn't work". Say it ten times. It is something you need to get used to, it'll happen many, many times. When you do something wrong, even by accident, it is you who did it - not the computer, operating system or anyone else. If you don't accept that up front, you'll find it much harder to fix your mistakes.

I believe I have mentioned this to you before. You really have to take it to heart. It is not a criticism. It is not for some enjoyment of mine. I had to go failures when I started as well. I've said it in the hope that you will learn something, and get better at what you are doing.

Re: override a specific SYSIN in PROC from a JCL

PostPosted: Fri Apr 20, 2012 12:26 am
by BillyBoyo
dn2012 wrote:I removed SYSIN DD DUMMY from the proc (as every one said earlier) and its work fine.
I will try to use substitute varibale in step 2 also.


I'm not aware that anyone mentioned DD DUMMY being any sort of a problem in a PROC. Is the above a typo? Did you mean DD *?

Now, you might want to use the substitution in step2, but you won't be able to as you are trying to substitute in a "card", which won't work. Remember, they were physical things. Couldn't change 'em. Until z/OS 1.13.

To do the symbol substitution in data you'll need to use another program. I seem to remember that your site has DFSORT. Try searching the DFSORT part of the forum for JPn or JP1 and tell us what you think.

Re: override a specific SYSIN in PROC from a JCL

PostPosted: Fri Apr 20, 2012 1:44 am
by NicC
If you mean you removed the SYSIN DD * and associated 'cards' then of course it worked because those 'cards' tell the program called IDCAMS what to do. No cards - no work (except, perhaps, to complain about no work to do).

Re: override a specific SYSIN in PROC from a JCL

PostPosted: Fri Apr 20, 2012 2:18 am
by dn2012
Substitute variable also work for me.

//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=*                                             
//SYSUT1   DD DISP=SHR,DSN=&SRCTPE   <= 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,SRCTPE=TSSDN.DATA.COPY2
//STEP2.SYSIN DD *                                                   
//STEP3.SYSIN DD *                                                   
    DEFINE GDG( -                                                     
    NAME(TSSDN.GDBD.TEMP02)-                                         
    LIMIT(7) NOEMPTY SCRATCH)                                         
/*                                                                   
//   



OUTPUT from SYSPRINT:

PDF0103C DEFAULT COPY OUTDD=SYSUT2,INDD=SYSUT1 * GENERATED
PDF0111I REUNLOAD: SYSUT1 DSN=TSSDN.DATA.COPY2 VOL=535682(TAPE)
PDF0113I UNLOAD DATASET'S PHYSIC
PDF0112I SYSUT2 DSN=TSSDN.DATA.COPY3 VOL=874400(TAPE)

IDCAMS SYSTEM SERVICES

DEFINE GDG( -
NAME(TSSDN.GDBD.TEMP02)-
LIMIT(7) NOEMPTY SCRATCH)
IDC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 0

IDC0002I IDCAMS PROCESSING COMPLETE. MAXIMUM CONDITION CODE WAS 0

thanks

Re: override a specific SYSIN in PROC from a JCL

PostPosted: Fri Apr 20, 2012 3:28 am
by BillyBoyo
Well, JCL substitutions would work. The one that wouldn't, in the data cards, you've finally removed.

If you are happy with that, we're happy. If you want to paramerise the control cards for IDCAMS, DFSORT can generate them.