View previous topic :: View next topic
|
Author |
Message |
balakrishna reddy
Active User
Joined: 13 Jul 2007 Posts: 128 Location: Guntur
|
|
|
|
Hi All,
I am trying to create a rexx code which will take input as table name and give the respective dclgen for it as output
i have a file with all the information of it like given below
Code: |
Table_Name Dclgen
Table1 Dclgen1
Table2 Dclgen2
Table3 Dclgen3
Table4 Dclgen4
|
Can anyone help me out in this concern |
|
Back to top |
|
|
Srihari Gonugunta
Active User
Joined: 14 Sep 2007 Posts: 295 Location: Singapore
|
|
|
|
Hi,
You can customize the following CLIST code for your needs.
PROC 0
DSN SYSTEM(DSN)
DCLGEN TABLE(OWNER.TABLE_NAME) +
LIBRARY('HLQ.DCLGENL(MEMBER)') +
ACTION(REPLACE) LANGUAGE(COBOL)
END
EXIT
Read each record from the file and put the above code in a loop etc, etc.
Thanks,
Sri Hari G. |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Not straight-forward, but doable.
You need to access DB2 catalog tables (aka SYSIBM), and get all the definitions of columns in the table. Then you need to use the fine manual that describes how to convert DB2 formats into COBOL formats, and generate the DCLGEN.
By the way, why you want to invent the wheel? DCLGEN is a free utility that comes with DB2... why not using it?
O. |
|
Back to top |
|
|
balakrishna reddy
Active User
Joined: 13 Jul 2007 Posts: 128 Location: Guntur
|
|
|
|
Hi,
you have miss understood my requirement,
i need rexx program or macro which will get me the dclgen member name for the respective table name which i give as in put in the command
like given below
tso dgen vtm_gnrt_invent
where vtm_gnrt_invent is table name,output should come as dclgen name for that table which i have already found it and pasted in the file as mentioned above.
when i give i/p as table name it should open the file and take the dclgen member name and display it on the screen |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
So, what is the problem? Reading a dataset using REXX?
O. |
|
Back to top |
|
|
balakrishna reddy
Active User
Joined: 13 Jul 2007 Posts: 128 Location: Guntur
|
|
|
|
Hi
If you don't mind can you give the rexx code for that, Because long back i have used rexx and forgot everything |
|
Back to top |
|
|
acevedo
Active User
Joined: 11 May 2005 Posts: 344 Location: Spain
|
|
|
|
so if the question is how to read in Rexx the dataset where the DCLGEN is stored? THEN try the wonderful Search facility in this forum!
tip: search for DISKR
;) |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Well, reading datasets in REXX is one of the basics. It even has it own chapter in the manuals, not to mention lots of discussions here in the forum (hint: look for EXECIO).
O. |
|
Back to top |
|
|
balakrishna reddy
Active User
Joined: 13 Jul 2007 Posts: 128 Location: Guntur
|
|
|
|
Hi All,
Thanks for your valuable tips now a new problem i am facing,
i wrote rexx code for it but the problem is i am able to run it only in my pc and only with my racf id,is there any way to run this code in all of my friends pc's with their racf id's |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
balakrishna reddy wrote: |
snip snip
...
the problem is i am able to run it only in my pc and only with my racf id,is there any way to run this code in all of my friends pc's with their racf id's |
I would like to straighten up the terminology a little bit
the issue is not pc related, but tso userid related
if You are able to logon to tso from a different pc with Your userid
You will certainly be able to carry on your usual work
( unless also terminal security has been enforced )
I guess You stored the rexx script in a ..personal.. library concatenated
to sysproc/sysexec
You should contact Your system support group and ask about a sharable
library where to store common tools ( rexx/clist) |
|
Back to top |
|
|
balakrishna reddy
Active User
Joined: 13 Jul 2007 Posts: 128 Location: Guntur
|
|
|
|
once i logoff my racf-id and again login into it and try to run my rexx code without allocating the file it is giving error.
any solution is there so that i can permanently allocate the file |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
did You read the lat two lines of my previous post |
|
Back to top |
|
|
|