Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

PUNCH-cards only?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
Claes Norreen

Active User


Joined: 20 Dec 2005
Posts: 137
Location: Denmark

PostPosted: Tue May 28, 2013 1:06 pm    Post subject: PUNCH-cards only?
Reply with quote

Hi,

I've created this "script" (see below) for unloading all tables in our production environment - including PUNCH cards. The intent is to load these in our Demo environment. However, in our Demo environment, there may be new columns in some tables. Therefore:

My question is: If I just wanted to create PUNCH cards using UNLOAD (and not the actual UNLOAD of data), will I have to do this table by table (using LIMIT 0)? It would be fantastic, if I had this option. icon_smile.gif


Another question: When I define the dynamic dataset names (using &DB and &TS) - how do I best avoid allocation errors (dataset already exists) when I run the job the 2nd time and on?


Code:

OPTIONS EVENT (ITEMERROR,SKIP,WARNING,RC4)

LISTDEF LIST1                   
  INCLUDE TABLE bla.blabla

TEMPLATE TUNLDDN                         
UNIT SYSDA                               
DISP(NEW,CATLG,DELETE)                   
SPACE CYL                                 
PCTPRIME 50                               
MAXPRIME 1000                             
DSN('T.UNLOAD.&DB..&TS..DATA');     
                                         
TEMPLATE TPUNCH                           
UNIT SYSDA                               
DISP(NEW,CATLG,DELETE)                   
SPACE(1,1)                               
DSN('T.UNLOAD.&DB..&TS..PUNCH');     
                                         
UNLOAD LIST LIST1
PUNCHDDN TPUNCH                           
UNLDDN TUNLDDN                           
Back to top
View user's profile Send private message

gylbharat

Active Member


Joined: 31 Jul 2009
Posts: 565
Location: Bangalore

PostPosted: Tue May 28, 2013 1:24 pm    Post subject:
Reply with quote

I think you have to do it table by table.

Regarding dynamic dataset names, you can define them as GDG with limit = 1 or any thing.
Back to top
View user's profile Send private message
Claes Norreen

Active User


Joined: 20 Dec 2005
Posts: 137
Location: Denmark

PostPosted: Tue May 28, 2013 1:38 pm    Post subject:
Reply with quote

Thanks for a quick reply!

Is this the place to post suggestions for future enhancements? If so, please add this to your list:

Make it possible to just create PUNCH cards without actually unloading anything.
Back to top
View user's profile Send private message
Dsingh29

Active User


Joined: 16 Dec 2008
Posts: 132
Location: IBM

PostPosted: Tue May 28, 2013 2:00 pm    Post subject:
Reply with quote

Add something like '.D&DT..T&TI' to add date and timestamp to avoid ds allocation errors.
Back to top
View user's profile Send private message
Claes Norreen

Active User


Joined: 20 Dec 2005
Posts: 137
Location: Denmark

PostPosted: Tue May 28, 2013 2:01 pm    Post subject:
Reply with quote

No, &TS is TABLESPACE
Back to top
View user's profile Send private message
Claes Norreen

Active User


Joined: 20 Dec 2005
Posts: 137
Location: Denmark

PostPosted: Tue May 28, 2013 2:07 pm    Post subject:
Reply with quote

Plus, I will only need ONE dataset for each table - I don't want to keep X number of generations, as this is of course very space consuming.
Back to top
View user's profile Send private message
Claes Norreen

Active User


Joined: 20 Dec 2005
Posts: 137
Location: Denmark

PostPosted: Tue May 28, 2013 2:15 pm    Post subject:
Reply with quote

GDGLIMIT 1 seems to work just as I wanted - thanks again. icon_smile.gif
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 645
Location: Pennsylvania

PostPosted: Tue May 28, 2013 5:24 pm    Post subject:
Reply with quote

What I have done is create a WHEN condition that will produce no rows returned.

Something like:

Code:
UNLOAD LIST LIST1
WHEN (LIST = 'X' AND LIST <> 'X')
PUNCHDDN TPUNCH                           
UNLDDN TUNLDDN


See if this works for you.
Back to top
View user's profile Send private message
Claes Norreen

Active User


Joined: 20 Dec 2005
Posts: 137
Location: Denmark

PostPosted: Tue May 28, 2013 6:03 pm    Post subject: Reply to: PUNCH-cards only?
Reply with quote

I tried, but didn't work? I'm on v10 - which version are you on?

Code:
- INVALID OPERAND 'WHEN' FOR KEYWORD 'UNLOAD'
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 645
Location: Pennsylvania

PostPosted: Tue May 28, 2013 6:10 pm    Post subject:
Reply with quote

How many tables are you Unloding with this?

After I posted, I noticed, my syntax was for the Unload of a single table, not a List of tables as you are doing.

This approach will not work I do not think.

PS - We are on DB2V9.
Back to top
View user's profile Send private message
Claes Norreen

Active User


Joined: 20 Dec 2005
Posts: 137
Location: Denmark

PostPosted: Tue May 28, 2013 6:14 pm    Post subject:
Reply with quote

About 50 icon_smile.gif

With single table syntax, it may be better to code LIMIT 0 instead.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Cards mainframe developer requirement... capricorn Mainframe Jobs 0 Sun Sep 11, 2016 9:57 am
No new posts Building control cards dynamically wi... rikdeb All Other Mainframe Topics 1 Sat Nov 15, 2014 3:27 pm
No new posts Need help to create dyamic cntl cards sampaul4u DFSORT/ICETOOL 9 Tue Apr 15, 2014 10:15 am
No new posts Understanding Sort Control Cards Bill Woodger DFSORT/ICETOOL 0 Tue Mar 12, 2013 7:04 am
No new posts how to file tailor control cards and ... enrico-sorichetti All Other Mainframe Topics 11 Tue Feb 12, 2013 2:45 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us