AS/400 – OCL procedures

5 pts.
Tags:
AS/400 development
OCL procedure
How to compile an OCL Procedure and debug the same in AS/400
ASKED: September 26, 2008  10:07 PM
UPDATED: September 29, 2008  6:03 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hi,

OCL is interpreted within the System/36 environment on the AS/400 – you don’t need to compile procedures to run them. There are several ways to start an OCL procedure :-

Use the STRS36PRC command to start a procedure from a non-S/36 environment job.

Start the S/36 environment using STRS36 (this is only for your job, not the whole system), change to the library where the procedure is (or ensure that the library is in your library list) and type the name of the procedure on the command line and press enter.

Use a menu to start your procedure (basically does the same as starting the procedure from a S/36 environment job).

There is no STRDBG or STRISDB type command for OCL – to debug your procedures you can change the logging level of your job :-

CHGJOB LOG(4 00 *SECLVL) LOGCLPGM(*YES)

You can also specify logging for your OCL procedure :-

CHGS36PRCA MBR(YOURPROC) FILE(YOURLIB/QS36PRC) LOG(*YES)

Bear in mind that your procedure may switch logging off (I think there’s an ATTR LOG-NO command to do this, but it’s been some time since I’ve looked at this).

When debugging, you can also add calls to QCMD to give you a command line at certain points of your procedure – this can be useful to check whether the previous commands have executed correctly or not.

If you have any specific problems with your procedures, just let us know – I’m sure someone here will have a solution for you.

Hope this all helps, regards,

Martin Gilbert.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following