View previous topic :: View next topic
|
Author |
Message |
GANAPATH
New User
Joined: 06 Mar 2006 Posts: 35
|
|
|
|
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 |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
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 |
|
|
subhadeep_infy
New User
Joined: 06 Mar 2006 Posts: 10
|
|
|
|
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 |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Thats exactly what I said:
Quote: |
The natural way is to use the UNLOAD utility, which generates the LOAD cards |
O. |
|
Back to top |
|
|
ragshere
New User
Joined: 20 Dec 2004 Posts: 70
|
|
|
|
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 |
|
|
GANAPATH
New User
Joined: 06 Mar 2006 Posts: 35
|
|
|
|
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 |
|
|
|