IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to build a load card(Control cards)


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
GANAPATH

New User


Joined: 06 Mar 2006
Posts: 35

PostPosted: Tue Mar 07, 2006 11:27 pm
Reply with quote

Hi,

i have more than 50 tables and i would like to build load cards for these tables, can anyone tell me how we can do it easily rather manually typing the positions for each and everything.


Thanks,
Ganapath
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Wed Mar 08, 2006 1:31 am
Reply with quote

Hi

The natural way is to use the UNLOAD utility, which generates the LOAD cards.

If you have FileAid/DB2 or BMC Catalog Manager, you can use their built-it feature for this exact purpose.

In the past, I wrote for customers a REXX exec and a NATURAL program to generate the cards, but they are not my property.

O.
Back to top
View user's profile Send private message
subhadeep_infy

New User


Joined: 06 Mar 2006
Posts: 10

PostPosted: Wed Mar 08, 2006 12:31 pm
Reply with quote

Hi Ganapath,
You can create upload cards by using the system defined program DSNTIAUL ( Check out the corresponding program for your system). Following is a sample JCL for the same.

//UNLDMT01 EXEC PGM=IKJEFT01,REGION=6M

//*

//SYSTSPRT DD SYSOUT=*

//SYSTSIN DD DSN=&CCLIB(DB2DWN),

// DISP=SHR

//*

//SYSPRINT DD SYSOUT=*

//SYSUDUMP DD SYSOUT=*

//*

//SYSREC00 DD DSN=&REQ..&TABLE..&OUT,

// DISP=(,CATLG,CATLG),

// SPACE=(CYL,(50,50),RLSE),

// UNIT=DASD

//*

//SYSPUNCH DD DSN=&REQ..&TABLE..CNTL1,

// DISP=(,CATLG),SPACE=(CYL,(1,1)),UNIT=DASD

//*

//SYSIN DD DSN=&CCLIB(&CARD),

// DISP=SHR

//*



Here SYSTSIN contains:

DSN SYSTEM(DSN)
RUN PROGRAM(DSNTIAUL) -
PLAN(DSNTIAUL) -
LIBRARY('SYS3.RUNLIB.LOAD') PARM('SQL')


and SYSIN contains :

Select * from <tablename>;


The SYSPUNCH will contain your upload card and SYSREC the data in the tabe. Once the card is created for the table, change it according to your needs and then you can use it.

Apart from this if you are using File Aid, you "might" have an option of creating an upload card.

I hope this answers your query.

Thanks,
Subhadeep
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Wed Mar 08, 2006 12:47 pm
Reply with quote

Thats exactly what I said:
Quote:
The natural way is to use the UNLOAD utility, which generates the LOAD cards


O.
Back to top
View user's profile Send private message
ragshere

New User


Joined: 20 Dec 2004
Posts: 70

PostPosted: Wed Mar 08, 2006 12:53 pm
Reply with quote

Hi Ganapath,


Here you can use REXX program for this purpose.

1.Write the list of tables in a PS file line by line.

2. write a rexx program which will read the above file to a stem variable.
write a loop which will run for num of tables(50) and create the JCL for UNLOAD utility for all these tables with sysrec dd 'DUMMY' and give syspunch dataset name wither same of different everytime.
Write this jcl to a PS file.

3. so that rexx will create a PS file with the jcl for unloading from 50 tables.just submit it. it will create the load cards for all tables.

Hope you got me.

Thanks
Rags
Back to top
View user's profile Send private message
GANAPATH

New User


Joined: 06 Mar 2006
Posts: 35

PostPosted: Thu Mar 09, 2006 4:15 am
Reply with quote

Hi everyone, that was really helpful, first i tried what Subhadeep wrote
and then i tried with rexx, now iam trying with OMEGAMON and all this is working. Thanks to everyone
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts How to load to DB2 with column level ... DB2 6
No new posts Using Dynamic file handler in the Fil... COBOL Programming 2
No new posts REASON 00D70014 in load utility DB2 6
Search our Forums:

Back to Top