override a specific SYSIN in PROC from a JCL



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Re: override a specific SYSIN in PROC from a JCL

Postby dn2012 » Wed Apr 18, 2012 7:51 pm

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.
dn2012
 
Posts: 114
Joined: Thu Feb 16, 2012 6:10 am
Has thanked: 0 time
Been thanked: 0 time

Re: Re: override a specific SYSIN in PROC from a JCL

 

Re: override a specific SYSIN in PROC from a JCL

Postby dn2012 » Wed Apr 18, 2012 8:20 pm

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
dn2012
 
Posts: 114
Joined: Thu Feb 16, 2012 6:10 am
Has thanked: 0 time
Been thanked: 0 time

Re: override a specific SYSIN in PROC from a JCL

Postby NicC » Wed Apr 18, 2012 10:28 pm

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
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times

Re: override a specific SYSIN in PROC from a JCL

Postby dn2012 » Thu Apr 19, 2012 4:18 am

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
dn2012
 
Posts: 114
Joined: Thu Feb 16, 2012 6:10 am
Has thanked: 0 time
Been thanked: 0 time

Re: override a specific SYSIN in PROC from a JCL

Postby BillyBoyo » Thu Apr 19, 2012 11:26 am

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.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: override a specific SYSIN in PROC from a JCL

Postby NicC » Thu Apr 19, 2012 12:08 pm

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.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times

Re: override a specific SYSIN in PROC from a JCL

Postby dn2012 » Thu Apr 19, 2012 8:36 pm

thanks
dn2012
 
Posts: 114
Joined: Thu Feb 16, 2012 6:10 am
Has thanked: 0 time
Been thanked: 0 time

Re: override a specific SYSIN in PROC from a JCL

Postby dn2012 » Thu Apr 19, 2012 10:35 pm

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
dn2012
 
Posts: 114
Joined: Thu Feb 16, 2012 6:10 am
Has thanked: 0 time
Been thanked: 0 time

Re: override a specific SYSIN in PROC from a JCL

Postby NicC » Thu Apr 19, 2012 10:38 pm

I guess Jennifer is your co-worker or co-student. Look up dummy in the manual. It is all there.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times

Re: override a specific SYSIN in PROC from a JCL

Postby BillyBoyo » Thu Apr 19, 2012 10:57 pm

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".
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

PreviousNext

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post