How can I get my SYSPUNCH cards into a single file



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

How can I get my SYSPUNCH cards into a single file

Postby Okonita » Thu Jan 31, 2013 6:41 am

I was wondering if anyone has a solution for this issue that I want to resolve.How can I get my SYSPUNCH cards into a single file while unloading from DB2 Table?

Here's what I am trying to accomplish. I can create a SYSPUNCH dataset using the template whether it is a GDG based dataset or a simple sequential file. I can dynamically create a file (lets call it FILEA) containing all the SYSPUNCH file names that I generated from doing an UNLOAD. THe whole idea is not to have to hard code tablespace name each and everytime a tablespace is added or dropped. I simply read my SYSTABLESPACE, extract the tablespace I am after, build according to the SYSPUNCH naming convention used during UNLOAD, feed
this FILEA to SYSUT1 such as the following:

//S01OF99 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD DSN=FILEA,DISP=OLD
//SYSUT2 DD DSN=SOMENAME,DISP=(,CATLG)

I want IEBGENER to read FILEA and copy the actual SYSPUNCH contoll statements of each name registered
in FILEA to to 1 single file named in SYSUT2. In order words merge all files. The contents of FILEA is
just a list of files to copy into SYSUT2 and the structure will look like this:
FILEA:

DD DISP=SHR,DSN=GO1.FDEV1.OSCR.D1UNL.GO1SCAM1.PUNCH
DD DISP=SHR,DSN=GO1.FDEV1.OSCR.D1UNL.GO1SCJR1.PUNCH
DD DISP=SHR,DSN=GO1.FDEV1.OSCR.D1UNL.GO1SDNF1.PUNCH
DD DISP=SHR,DSN=GO1.FDEV1.OSCR.D1UNL.GO1SGAJ1.PUNCH
DD DISP=SHR,DSN=GO1.FDEV1.OSCR.D1UNL.GO1SGCT1.PUNCH
DD DISP=SHR,DSN=GO1.FDEV1.OSCR.D1UNL.GO1SMSR1.PUNCH
DD DISP=SHR,DSN=GO1.FDEV1.OSCR.D1UNL.GO1SNAK1.PUNCH
DD DISP=SHR,DSN=GO1.FDEV1.OSCR.D1UNL.GO1SOFC1.PUNCH
DD DISP=SHR,DSN=GO1.FDEV1.OSCR.D1UNL.GO1SGO11.PUNCH

When I tried this method, IEBGENER errors-out with this message:

DATA SET UTILITY - GENERATE
DD DISP=SHR,DSN=GO1.FDEV1.OSCR.D1UNL.GO1SCAM1.PUNCH
IEB336I INVALID COMMAND IN COL. 07
DD DISP=SHR,DSN=GO1.FDEV1.OSCR.D1UNL.GO1SCJR1.PUNCH
IEB336I INVALID COMMAND IN COL. 07
DD DISP=SHR,DSN=GO1.FDEV1.OSCR.D1UNL.GO1SDNF1.PUNCH
IEB336I INVALID COMMAND IN COL. 07
DD DISP=SHR,DSN=GO1.FDEV1.OSCR.D1UNL.GO1SGAJ1.PUNCH

What do I need to correct the error and make this work.

Thanks in advance for all suggestions.
Okonita
 
Posts: 10
Joined: Thu Dec 13, 2007 4:53 am
Has thanked: 0 time
Been thanked: 0 time

Re: How can I get my SYSPUNCH cards into a single file

Postby Akatsukami » Thu Jan 31, 2013 9:12 pm

IEBGENER does not do what you are trying to do. SYSUT1 must contain the actual data to be copied, not a list of references to those data.

If this is to be a repeated task, I recommend that you create a skeleton for your IEBGENER job, and write a brief Rexx script that uses ISPF file-tailoring services to generate it with the data from FILEA, and then submits the job.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: How can I get my SYSPUNCH cards into a single file

Postby NicC » Fri Feb 01, 2013 1:18 am

Also try reading the manual for something before trying to use it and before posting.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: How can I get my SYSPUNCH cards into a single file

Postby Okonita » Sat Feb 02, 2013 12:19 am

Akatsukami,
Thank you so very much for your thoughtful and experienced explanation. Recommendations well taken.

NicC, I appreciate your informative response to my inquiry. Perhaps you might want to consider that some of us do read the manuals but somehow are unable to comprehend the finer points of the subject matter at hand and that's why we come to you, Akatsukami, and other of reknown expertise. I hope this forum is not for geniuses, because I'll gladly disqualify myself...

Best regards
Okonita
 
Posts: 10
Joined: Thu Dec 13, 2007 4:53 am
Has thanked: 0 time
Been thanked: 0 time

Re: How can I get my SYSPUNCH cards into a single file

Postby NicC » Sat Feb 02, 2013 4:02 am

IEBGENER is fairly clear on its control cards and jcl requirements with several examples.
And I do acknowledge the fact that reading the manual can be a horrible experience - I get the heebie-jeebies with the DFSort manual once I get past SORT!
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post