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
 

 

attachpgm vs call

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

Active Member


Joined: 07 Feb 2009
Posts: 982
Location: Oostende, Belgium

PostPosted: Mon Apr 25, 2016 11:29 am    Post subject: attachpgm vs call
Reply with quote

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

prino

Active Member


Joined: 07 Feb 2009
Posts: 982
Location: Oostende, Belgium

PostPosted: Mon Apr 25, 2016 12:22 pm    Post subject: Reply to: attachpgm vs call
Reply with quote

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. icon_sad.gif
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Mon Apr 25, 2016 1:10 pm    Post subject:
Reply with quote

I believe you need to have your DB2 up and running no matter what...
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 641
Location: Whitby, ON, Canada

PostPosted: Mon Apr 25, 2016 5:52 pm    Post subject:
Reply with quote

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 http://www.idug.org/p/fo/et/thread=23897
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2019
Location: Silicon Valley

PostPosted: Mon Apr 25, 2016 9:35 pm    Post subject: Reply to: attachpgm vs call
Reply with quote

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

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Mon Apr 25, 2016 10:36 pm    Post subject:
Reply with quote

Just curious, what is the point for DSNTIAR without DB2 being active? or Am I missing anything here?
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2019
Location: Silicon Valley

PostPosted: Tue Apr 26, 2016 12:51 am    Post subject: Reply to: attachpgm vs call
Reply with quote

Quote:
or Am I missing anything here?

I thought Prino was reporting that the CALL command was not working as expected.
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
No new posts Cobol EZASOKET call to SETSOCKOPT fails Andi1982 COBOL Programming 6 Thu Oct 06, 2016 7:12 pm
No new posts Strange EXEC function call in z/VM Willy Jensen CLIST & REXX 3 Wed Oct 05, 2016 2:07 pm
No new posts COBOL DB2 - CALL statement - high CPU... TS70363 DB2 15 Sun Sep 11, 2016 6:07 am
No new posts Is possible to call subprogram from c... cmsmoon COBOL Programming 3 Fri Aug 05, 2016 6:46 pm
No new posts PCOMM macro to call another PCOMM macro boyti ko All Other Mainframe Topics 4 Tue Jul 12, 2016 4:30 pm


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