Hi All,
I recently started working with a company that has an iSeries that is running S/36 code.  Once the User signs on, a CL is called that runs the STRS36 command and then their S/36 software application menu is displayed.  The application software uses OCL and RPG though it does incorporate a few CL procedures to call KeyesMail commands that will send e-mail from within the application.

This company is not yet prepared to rewrite (i.e. convert) their software to native iSeries so I am trying to work within the current environment, but to provide some additional functionality.  I am making some program enhancements and I am running into a problem and I would like to know if there is an easy way to overcome it.
I have found that from the command line or from a menu, you can run S/36 OCL and within the OCL, you can call CL programs and run iSeries native RPG programs.Also, you can call a CL program and then run a OCL procedure using the STRS36PRC procedure.
My problem is that I have a need to run a S/36 OCL from within a CL program that was originally called from a S/36 OCL.That is,
     - A S/36 OCL starts the Invoicing process.     - Within this OCL, I am calling a CL program that will run a new Invoice e-mailing process.     - The CL program uses the CALL command which calls an iSeries RPG program.     - Within this RPG program, I call a CL program in which I want to run an existing OCL procedure.     - To run this OCL procedure, I was going to use the STRS36PRC command.  However, I get an error message that it is not allowed within this process.

Based on my research, when a S/36 OCL process has started, you can run a CL program, but you cannot then run another S36 OCL from within the CL program.  The error message is below.

                         Additional Message Information                                                                                                         Message ID . . . . . . :   CPA0701      Severity . . . . . . . :   99          Message type . . . . . :   Inquiry                                              Date sent . . . . . . :   02/16/16      Time sent . . . . . . :   15:57:12                                                                                   Message . . . . :   SSP0142 received by CLBILLEPC1 at 2600. (C DI R)           Cause . . . . . :   Control language (CL) program CLBILLEPC1 inlibrary BSILIB    detected an error at statement number 2600.Message text for SSP0142 is:        S/36 environment function not allowed orerror in command.                    Recovery . . . :   This inquiry message canbe avoided by changing the           program. Monitor for the error (MONMSGcommand) and perform error recovery      within the program. To continue, choose areply value.                        Possible choices for replying to message . . .. . . . . . . . . . . . :          C -- Cancel the CL program.                                                    D -- Dump the CL program variables andcancel the CL program.                   I -- Ignore the failing command.                                                R -- Try the failing command again.                                                                                                                  Bottom  Press Enter to continue.                                                                                                                                      F3=Exit  F6=Print   F9=Display messagedetails                                 F10=Display messages in job log   F12=Cancel  F21=Select assistance level    

Is there some other way to perform the process that I am trying to run?
If not, then it seems that my only choice to rewrite the last section that is in OCL as an iSeries CL procedure with iSeries RPG programs. Is that my only option?

I would appreciate any suggestions or direction. 
 Thanks very much.
Les Mittman
Cell: 847-858-5235

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.