MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Establishing a DB2 DSN Session in REXX

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
jim haire
Beginner


Joined: 30 Dec 2002
Posts: 140
Topics: 40

PostPosted: Fri Mar 30, 2007 8:06 am    Post subject: Establishing a DB2 DSN Session in REXX Reply with quote

I would like to execute the DCLGEN subcommand through a REXX command. THE DCLGEN subcommand needs to be submitted from a DSN session. (Per section 3.10.1 in the DB2 Command Reference manual).

How do you establish yourself as being in a DSN session in REXX?
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Fri Mar 30, 2007 8:15 am    Post subject: Reply with quote

jim haire,

Please search before posting. check this link

http://www.mvsforums.com/helpboards/viewtopic.php?t=3361&highlight=dsnrexx

Hope this helps...

Cheers

kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jim haire
Beginner


Joined: 30 Dec 2002
Posts: 140
Topics: 40

PostPosted: Fri Mar 30, 2007 9:17 am    Post subject: Reply with quote

I don't have a problem getting connected to the DB2 REXX facility DSNREXX. I have a number of commands that work in this environment and execute SQL statements.

The DCLGEN command needs to be run in a DSN session.
I'm not sure what a DSN session is exactly. I think it may be similar to connecting to the Call Attach Facility. Do I get into the DSN environment through a REXX ADDRESS command?

Once I'm in the DSN Environment, do I execute the DCLGEN command using the EXECSQL PREPARE like I do for normal SQL? DCLGEN isn't really part of SQL. It's a command.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Fri Mar 30, 2007 9:53 am    Post subject: Reply with quote

jim haire,

You can invoke the DCLGEN by building the JCL shown here in your REXX

http://www.mvsforums.com/helpboards/viewtopic.php?t=8103

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jim haire
Beginner


Joined: 30 Dec 2002
Posts: 140
Topics: 40

PostPosted: Fri Mar 30, 2007 12:56 pm    Post subject: Reply with quote

That is a good idea Kolusu, although not what I was looking for.

Through experimenting, I found that I can attach to the DSN environment if I am in the TSO address space. My next step will be to try and execute the DCLGEN command.

The final solution I am trying to get towards is to be able to build a DCLGEN for multi-row fetches....the DCLGEN needs occurs clauses built in.

IBM has not built this feature into its DCLGEN command yet. I suppose I could execute a job as you suggested, monitor for its completion, and then add the occurs clause via a change command or some other method.

I am trying to do this in the foreground environment for simplicity.

Any other suggestions are welcome! Thanks for your responses.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group