Enyinnaya
asked on
How can I get my SYSPUNCH cards into a single file while unloading from DB2 Table?
Hello again Gurus,
I was wondering if anyone has a solution for this issue that I want to resolve. Using LISTDEF and the TEMPLATE command I can dynamically write out all dataset including SYSPUNCH with unique names. However, what if I want to write all SYSPUNCH cards into a single file instead of many files? Something tells me it could be done but I just can't think of how to make that happen.
Can anyone suggest a possible solution?
As always, thank you guys...
I was wondering if anyone has a solution for this issue that I want to resolve. Using LISTDEF and the TEMPLATE command I can dynamically write out all dataset including SYSPUNCH with unique names. However, what if I want to write all SYSPUNCH cards into a single file instead of many files? Something tells me it could be done but I just can't think of how to make that happen.
Can anyone suggest a possible solution?
As always, thank you guys...
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If I understand the DB2 manuals correctly the only initial DISP you can have for punch is new.
It looks like you would need to use another step to copy each individual file into a single file. If you use a GDG for this you could then use IEBGENER to copy all generations into a single file.
It looks like you would need to use another step to copy each individual file into a single file. If you use a GDG for this you could then use IEBGENER to copy all generations into a single file.
ASKER
giltjr,
Okay, how would you use GDG and IEBGENER to accomplish your suggestion. The tablespace name is variable and many. IEBGENER GDG(0) for every tablespace each time I run the UNLOAD?
Okay, how would you use GDG and IEBGENER to accomplish your suggestion. The tablespace name is variable and many. IEBGENER GDG(0) for every tablespace each time I run the UNLOAD?
don't go through all that trouble
what happens if you allocate syspunch in the jcl?
//SYSPUNCH DD DISP=...
what happens if you allocate syspunch in the jcl?
//SYSPUNCH DD DISP=...
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
momi_sabq,
You suggestion is what we currrently doing. What we are trying to achieve is to avoid having to go intoeach and every unload/Load job to add or remove a new tablespace or delete a dropped tablespace.
You suggestion is what we currrently doing. What we are trying to achieve is to avoid having to go intoeach and every unload/Load job to add or remove a new tablespace or delete a dropped tablespace.
ASKER
giltjr,
I don't understand what you are telling me. If I could, I would like to write all the tablespace SYSPUNCH cards to only one file or find a clever way to get my JCL to copy each and all punch cards dataset into one file. Your suggestion intriques me and I plan to try that method on Wednesday.
However, can you explain further what you would do to set up the GDG structure? Please some examples will be much helpful. I learn better with examples.
Thank you
I don't understand what you are telling me. If I could, I would like to write all the tablespace SYSPUNCH cards to only one file or find a clever way to get my JCL to copy each and all punch cards dataset into one file. Your suggestion intriques me and I plan to try that method on Wednesday.
However, can you explain further what you would do to set up the GDG structure? Please some examples will be much helpful. I learn better with examples.
Thank you
ASKER
gilrjr,
I have tried the GDG suggestion and I got thhis error:
Here's my Template definition for the GDGs:
TEMPLATE UNLOADDS
DSN('GO1.F&DB(5,4)..OSCR.D 1UNL.&TS.. DATA')
UNIT SYSDA
DISP(NEW,CATLG,DELETE)
EXPDL '1999000'
TEMPLATE PUNCHDS
DSN('GO1.F&DB(5,4)..OSCR.D 1UNL.LODPU NCH')
UNIT SYSDA
DISP(NEW,CATLG,DELETE)
SPACE (1,1) TRK
GDGLIMIT(3)
DSNUQUIB - QUIESCE UTILITY COMPLETE, ELAPSED TIME= 00:00:00
DSNUGUTC - UNLOAD LIST OG1LIST UNLDDN UNLOADDS PUNCHDDN PUNCHDS
DSNUGULM - PROCESSING LIST ITEM: TABLESPACE OG1DDEV1.OG1SCAM1
DSNUGTIS - PROCESSING TEMPDD AS EBCDIC
DSNUULND - TEMPLATE PUNCHDS SPECIFIED FOR PUNCHDDN IS INVALID FOR MULTIPLE TABLE
DSNUGBAC - UTILITY EXECUTION TERMINATED, HIGHEST RETURN CODE=8
If the Template GDG cannot be used, can you show example of how I could use the IEBGENER method.
Thank you
I have tried the GDG suggestion and I got thhis error:
Here's my Template definition for the GDGs:
TEMPLATE UNLOADDS
DSN('GO1.F&DB(5,4)..OSCR.D
UNIT SYSDA
DISP(NEW,CATLG,DELETE)
EXPDL '1999000'
TEMPLATE PUNCHDS
DSN('GO1.F&DB(5,4)..OSCR.D
UNIT SYSDA
DISP(NEW,CATLG,DELETE)
SPACE (1,1) TRK
GDGLIMIT(3)
DSNUQUIB - QUIESCE UTILITY COMPLETE, ELAPSED TIME= 00:00:00
DSNUGUTC - UNLOAD LIST OG1LIST UNLDDN UNLOADDS PUNCHDDN PUNCHDS
DSNUGULM - PROCESSING LIST ITEM: TABLESPACE OG1DDEV1.OG1SCAM1
DSNUGTIS - PROCESSING TEMPDD AS EBCDIC
DSNUULND - TEMPLATE PUNCHDS SPECIFIED FOR PUNCHDDN IS INVALID FOR MULTIPLE TABLE
DSNUGBAC - UTILITY EXECUTION TERMINATED, HIGHEST RETURN CODE=8
If the Template GDG cannot be used, can you show example of how I could use the IEBGENER method.
Thank you
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
moni_sabq, giltjr, Let me clarify what I am trying to accomplish.
Everything you guys gave suggested on tis thread works...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. Inorder 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.OSC R.D1UNL.GO 1SCAM1.PUN CH
DD DISP=SHR,DSN=GO1.FDEV1.OSC R.D1UNL.GO 1SCJR1.PUN CH
DD DISP=SHR,DSN=GO1.FDEV1.OSC R.D1UNL.GO 1SDNF1.PUN CH
DD DISP=SHR,DSN=GO1.FDEV1.OSC R.D1UNL.GO 1SGAJ1.PUN CH
DD DISP=SHR,DSN=GO1.FDEV1.OSC R.D1UNL.GO 1SGCT1.PUN CH
DD DISP=SHR,DSN=GO1.FDEV1.OSC R.D1UNL.GO 1SMSR1.PUN CH
DD DISP=SHR,DSN=GO1.FDEV1.OSC R.D1UNL.GO 1SNAK1.PUN CH
DD DISP=SHR,DSN=GO1.FDEV1.OSC R.D1UNL.GO 1SOFC1.PUN CH
DD DISP=SHR,DSN=GO1.FDEV1.OSC R.D1UNL.GO 1SGO11.PUN CH
When I tried this method, IEBGENER errors-out with this message:
DATA SET UTILITY - GENERATE
DD DISP=SHR,DSN=GO1.FDEV1.OSC R.D1UNL.GO 1SCAM1.PUN CH
IEB336I INVALID COMMAND IN COL. 07
DD DISP=SHR,DSN=GO1.FDEV1.OSC R.D1UNL.GO 1SCJR1.PUN CH
IEB336I INVALID COMMAND IN COL. 07
DD DISP=SHR,DSN=GO1.FDEV1.OSC R.D1UNL.GO 1SDNF1.PUN CH
IEB336I INVALID COMMAND IN COL. 07
DD DISP=SHR,DSN=GO1.FDEV1.OSC R.D1UNL.GO 1SGAJ1.PUN CH
What do I need to correct the error and make this work.
Thanks
Everything you guys gave suggested on tis thread works...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. Inorder 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.OSC
DD DISP=SHR,DSN=GO1.FDEV1.OSC
DD DISP=SHR,DSN=GO1.FDEV1.OSC
DD DISP=SHR,DSN=GO1.FDEV1.OSC
DD DISP=SHR,DSN=GO1.FDEV1.OSC
DD DISP=SHR,DSN=GO1.FDEV1.OSC
DD DISP=SHR,DSN=GO1.FDEV1.OSC
DD DISP=SHR,DSN=GO1.FDEV1.OSC
DD DISP=SHR,DSN=GO1.FDEV1.OSC
When I tried this method, IEBGENER errors-out with this message:
DATA SET UTILITY - GENERATE
DD DISP=SHR,DSN=GO1.FDEV1.OSC
IEB336I INVALID COMMAND IN COL. 07
DD DISP=SHR,DSN=GO1.FDEV1.OSC
IEB336I INVALID COMMAND IN COL. 07
DD DISP=SHR,DSN=GO1.FDEV1.OSC
IEB336I INVALID COMMAND IN COL. 07
DD DISP=SHR,DSN=GO1.FDEV1.OSC
What do I need to correct the error and make this work.
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ok
ASKER
DSNU1222I DSNUULND - TEMPLATE PUNCHDS SPECIFIED FOR PUNCHDDN IS INVALID FOR MUMULTIPLE TABLE SPACES
DSNU012I DSNUGBAC - UTILITY EXECUTION TERMINATED, HIGHEST RETURN CODE=8
And the TEMPLATE is defined as follows:
//TEMPDD DD *
TEMPLATE UNLOADDS
DSN('OG3.F&SSID..OSCR.D1UN
UNIT SYSDA
DISP(NEW,CATLG,DELETE)
EXPDL '1999000'
TEMPLATE PUNCHDS
DSN('SD1.F&SSID..OSCR.D1UN
UNIT SYSDA
DISP(MOD,CATLG,DELETE)
SPACE (1,1) TRK
//SYSIN DD *
OPTIONS LISTDEFDD(LISTDD) TEMPLATEDD(TEMPDD)
QUIESCE LIST SD1LIST
UNLOAD LIST SD1LIST
UNLDDN UNLOADDS
PUNCHDDN PUNCHDS
If ony I can use LISTDEF with IEBGENER, I could then append all SYSPUNCH dataset to to one SYSUT2 output dataset.
Anyone have anyother ideas?
Thanks