View previous topic :: View next topic
|
Author |
Message |
Appu
New User
Joined: 26 Apr 2010 Posts: 73 Location: India
|
|
|
|
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 |
|
|
Appu
New User
Joined: 26 Apr 2010 Posts: 73 Location: India
|
|
|
|
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 |
|
|
Appu
New User
Joined: 26 Apr 2010 Posts: 73 Location: India
|
|
|
|
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 |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
- ALLOCATE SYSPRINT to the terminal in your exec.
- The parameter to a MAIN procedure must be declared as CHAR (100) VAR;
- The slash (to separate run-time from application parameters) is not necessary in the TSO environment.
- You recognize that you are passing the literal "ABC", not the variable ABC?
|
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
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 |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
Akatsukami wrote: |
- 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 |
|
|
Appu
New User
Joined: 26 Apr 2010 Posts: 73 Location: India
|
|
|
|
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 |
|
|
|