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
 

 

REXX calling PL/1 proc

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

New User


Joined: 26 Apr 2010
Posts: 74
Location: India

PostPosted: Fri Oct 25, 2013 3:26 pm    Post subject: REXX calling PL/1 proc
Reply with quote

Hi,

I am trying to call a PL/1 program from REXX.

My PLI programs is like :

Code:

SUBPGM:PROC (ABC);       
    DCL ABC CHAR(10);     
END SUBPGM;               


I compiled and called it as follows from REXX ; but I am getting S0C 4.

Code:

ADDRESS TSO "CALL 'SYS1.MYPDS.NCAL(SUBPGM)' '/ABC'"     


Please advise.
Back to top
View user's profile Send private message

Appu

New User


Joined: 26 Apr 2010
Posts: 74
Location: India

PostPosted: Fri Oct 25, 2013 3:34 pm    Post subject:
Reply with quote

Hi Team,

Got it worked when I changed NCAL lib to LOAD lib and changed my program as follows :

Code:

SUBPGM:PROC (ABC) OPTIONS(MAIN NOEXECOPS); 
    DCL ABC CHAR(10);                       
    PUT SKIP LIST('HELLO');                 
END SUBPGM;                                 
Back to top
View user's profile Send private message
Appu

New User


Joined: 26 Apr 2010
Posts: 74
Location: India

PostPosted: Fri Oct 25, 2013 5:19 pm    Post subject:
Reply with quote

Hi Team,

The variable value is not getting received properly. Please advise.

I am getting blank in the receiving program in PL1

Code:


ABC = 'hello'
ADDRESS TSO "CALL 'SYS1.MYPDS.LOADLIB(SUBPGM)' '/ABC'"   

Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Fri Oct 25, 2013 7:47 pm    Post subject:
Reply with quote

  1. ALLOCATE SYSPRINT to the terminal in your exec.
  2. The parameter to a MAIN procedure must be declared as CHAR (100) VAR;
  3. The slash (to separate run-time from application parameters) is not necessary in the TSO environment.
  4. You recognize that you are passing the literal "ABC", not the variable ABC?
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Fri Oct 25, 2013 11:48 pm    Post subject: Reply to: REXX calling PL/1 proc
Reply with quote

Quote:
4. You recognize that you are passing the literal "ABC", not the variable ABC?

Similarly, you are PUTting the literal when you should be putting the variable.
Quote:
PUT SKIP LIST('HELLO');
Back to top
View user's profile Send private message
prino

Active Member


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

PostPosted: Sat Oct 26, 2013 2:23 am    Post subject:
Reply with quote

Akatsukami wrote:

  1. The slash (to separate run-time from application parameters) is not necessary in the TSO environment.

Actually it is, unless, as the TS has done, you use the NOEXECOPS option. This option can also be used for BATCH programs, if they never require any run-time parameters.
Back to top
View user's profile Send private message
Appu

New User


Joined: 26 Apr 2010
Posts: 74
Location: India

PostPosted: Mon Oct 28, 2013 11:03 am    Post subject: Reply to: REXX calling PL/1 proc
Reply with quote

Hello Team,

Many thanks for all your comments .

I got it worked by changing the CHAR(100) VARYING.

One more doubt. I am calling an IMS program from the REXX whose proc statement is as follows :

Code:
 
DLITPLI: PROC(DVO911_PCB_PTR) OPTIONS(MAIN) REORDER;     


will it be possible to call the above proc from a REXX ? Because can I pass other parms other than the PCBs in the DLITPLI proc ?
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 What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am
This topic is locked: you cannot edit posts or make replies. Need to code a Rexx PGM sundaram.naveen CLIST & REXX 18 Thu Oct 06, 2016 6:45 pm
No new posts Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm


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