Without starting 36 env, try using: STRS36PRC PRC(COL019) This assumes that the procedure is in #LIBRARY, there is a parameter for library and for parameters. -dan
Unconfigured Ad Widget
Collapse
Announcement
Collapse
No announcement yet.
Calling a RPG36 program from CL
Collapse
X
-
Calling a RPG36 program from CL
S/36 programs should be LOADed via OCL rather than CALLed. Create a source file and name it QS36PRC. Create a member less eight characters or less. The syntax for S/36 programs is as follows: // LOAD xxxxx // FILE NAME-yyyyy // RUN Once you have established the S36 procedure, you can then use STRS36PRC to run the procedure from CL. Dave
Comment
-
Calling a RPG36 program from CL
Sorry, wasn't thinking. The STRS36PRC PRC parameter does not allow a program name, while the STRS36 PRC parameter does. Try: STRS36 PRC(COL019) CURLIB(??) If that doesn't work, do a WRKOBJ *ALL/COL019. Is it still in #LIBRARY? Or in another library not in your library list? -dan
Comment
-
Calling a RPG36 program from CL
I am in the initial stages of converting OCL to CL. I tried to write a CL to call a RPG36 program and it failed. It said that I needed to be in the 36 environment. No problem, I ran STRS36. I continue to get the message. It is "RPG program COL019 must run from a S/36 environment job." Now, I thought that since the program COL019 was compiled and the object resided in the library, that I would be able to "Call" it. I want to get this working first so I know what I will need to do the rest of the conversions. Here is the coding that I had. The original code is at the bottom and edited out. Thank You Harold[*]************************************************** **************** pgm DCL VAR(&DSPNAM) TYPE(*CHAR) LEN(10) DCL VAR(&file) TYPE(*CHAR) LEN(10) DCL VAR(&vwno) TYPE(*CHAR) LEN(4) rtvjoba job(&dspnam) CHGVAR VAR(&FILE) VALUE('w.' || &DSPNAM |< 'VWNO') OVRDBF FILE(WORK) TOFILE(&file) OVRDBF FILE(Wrkordr) TOFILE(*LIBL/W.wkordr) call col019 /* // LOAD COL019 */ /* // FILE NAME-WORK,LABEL-W.?WS?VWNO */ /* // FILE NAME-WRKORDR,LABEL-W.WKORDR,DISP-SHRRM */ /* // RUN */ endpgm
Comment
-
Calling a RPG36 program from CL
Hcolumber2 wrote: > > There already is an OCL to call the program COL019. What I am wanting to do is convert the OCL to CL and not change the RPG36 program yet. > > Do I have to convert the RPG program first, then convert the OCL? Yes, you have to convert the program if you want to use "call". Once I tried to get around this by calling the RPG36 program from a CLP, but that doesn't work - you have to use // LOAD // RUN to call the CLP (or any other language) if the program wants to call a 36 program.
Comment
Comment