View previous topic :: View next topic
|
Author |
Message |
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
In one of my execs I use
Code: |
address attchpgm "dsntiar sqlca tiar_msg text_len" |
and if the system is IPL'ed with a loadparm that sets up a system where DB2 is running, everything is hunky-dory, and the code works as expected.
However, if I IPL with a loadparm that does not start DB2, REXX returns a RC = -3. So I thought, why not change it to
Code: |
"call 'dsn910.sdsnload(dsntiar)'" sqlca tiar_msg text_len |
but no matter what or how I quote in the parameters, I cannot get it to work, getting messages about invalid keywords.
Does anyone know how to actually get it to work? |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
Additional, trying to use it like
Code: |
"ispexec libdef ispllib dataset id('dsn910.sdsnload') stack"
"ispexec select pgm(dsntiar) parm("sqlca","tiar_msg","text_len")"
"ispexec libdef ispllib" |
Gives me a S0C4 and on occasion an ISPF main task abend, throwing me back to the READY prompt. |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
I believe you need to have your DB2 up and running no matter what... |
|
Back to top |
|
|
don.leahy
Active Member
Joined: 06 Jul 2010 Posts: 765 Location: Whitby, ON, Canada
|
|
|
|
I just ran a test, and it appears that DSNTIAR requires an active DB2 connection in order to function properly.
For what it is worth I call DSNTIAR from rexx using my RXSQLCA program www.idug.org/p/fo/et/thread=23897 |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2546 Location: Silicon Valley
|
|
|
|
For:
Code: |
address attchpgm "dsntiar sqlca tiar_msg text_len" |
I recall that the parameters are variable names. Rexx will resolve the values of the variables before attaching the specified module name.
But the syntax for CALL is different. The parameter list needs to be enclosed in single quotes. Maybe something like this:
Code: |
"call 'dsn910.sdsnload(dsntiar)' '"|| sqlca tiar_msg text_len || "'" |
Though, if any of those variables include single quotes, you need to double them up.
re: "getting messages about invalid keywords"
Can you provide the message? Are they TSO messages or DB2 messages? |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
Just curious, what is the point for DSNTIAR without DB2 being active? or Am I missing anything here? |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2546 Location: Silicon Valley
|
|
|
|
Quote: |
or Am I missing anything here? |
I thought Prino was reporting that the CALL command was not working as expected. |
|
Back to top |
|
|
|