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
 

 

need rexx code for taking table name and giving dclgen forit

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
balakrishna reddy

Active User


Joined: 13 Jul 2007
Posts: 130
Location: Guntur

PostPosted: Wed Feb 06, 2008 2:53 pm    Post subject: need rexx code for taking table name and giving dclgen forit
Reply with quote

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
View user's profile Send private message

Srihari Gonugunta

Active User


Joined: 14 Sep 2007
Posts: 295
Location: Singapore

PostPosted: Wed Feb 06, 2008 3:41 pm    Post subject:
Reply with quote

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
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Wed Feb 06, 2008 3:44 pm    Post subject:
Reply with quote

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
View user's profile Send private message
balakrishna reddy

Active User


Joined: 13 Jul 2007
Posts: 130
Location: Guntur

PostPosted: Wed Feb 06, 2008 4:25 pm    Post subject:
Reply with quote

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
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Wed Feb 06, 2008 4:28 pm    Post subject:
Reply with quote

So, what is the problem? Reading a dataset using REXX?

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

Active User


Joined: 13 Jul 2007
Posts: 130
Location: Guntur

PostPosted: Wed Feb 06, 2008 4:32 pm    Post subject:
Reply with quote

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
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Wed Feb 06, 2008 5:00 pm    Post subject:
Reply with quote

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
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Wed Feb 06, 2008 5:01 pm    Post subject:
Reply with quote

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
View user's profile Send private message
balakrishna reddy

Active User


Joined: 13 Jul 2007
Posts: 130
Location: Guntur

PostPosted: Thu Feb 07, 2008 4:45 pm    Post subject:
Reply with quote

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 icon_question.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Thu Feb 07, 2008 4:53 pm    Post subject:
Reply with quote

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 icon_question.gif


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
View user's profile Send private message
balakrishna reddy

Active User


Joined: 13 Jul 2007
Posts: 130
Location: Guntur

PostPosted: Thu Feb 07, 2008 5:13 pm    Post subject:
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Thu Feb 07, 2008 5:17 pm    Post subject: Reply to: need rexx code for taking table name and giving dc
Reply with quote

did You read the lat two lines of my previous post icon_confused.gif
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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts Job failing with USER = 4093 REASON C... Pradeepa S ABENDS & Debugging 1 Wed May 17, 2017 3:35 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm
No new posts unload data from table with lob columns farhad_evan DB2 0 Sat Apr 22, 2017 1:32 pm


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