Operation Control Language


SSP Procedures

The S/36E supports most of the SSP procedures of the true S/36. The exceptions are because of differences in architecture, which make it impractical or down-right impossible to support certain functions.

For example, the S/36 needs to run the COMPRESS procedure periodically, to gather all available disk space (which may be scattered in tiny fragments throughout the disks) in a single spot. Because of the single-level storage architecture of the i5, this procedure is completely useless.

The supported procedures run without modification.

#STRTUP1 and #STRTUP2

You can create a STRTUP1 or STRTUP2 procedure (or both) in #LIBRARY or in the system operators sign-on library. #STRTUP1 and #STRTUP2 are executed after other jobs are allowed to run. In other words, both procedures are treated as #STRTUP2.

Tip 

If you need to run a procedure before anyone signs on or other jobs run, you must do some native programming. The system value QSTRUPPGM contains the qualified name of the start-up program that runs during IPL. You can change this program to include the Start S/36 Procedure (STRS36PRC) command so that it executes your procedure as part of the start-up process. The start-up program is discussed in Chapter 2.

New Procedure (FLIB)

The FLIB procedure allows you to specify which library is to supply the data files for the session. By default, that library is QS36F, but you can change it for the duration of your session by using the FLIB procedure. If you want to make the change permanent, you must run the Change S/36 (CHGS36) command.

FLIB's second parameter allows values LIBL and NOLIBL. Using this parameter, you can specify whether you want your session to use the native library-list support to locate data files if they dont happen to be in your files library.

Both parameters are optional, but at least one must be specified. If you omit one of the parameters, your sessions setting (that would be controlled by the missing parameter) will not change. For example, lets say you execute:

       FLIB, LIBL 

Because the first parameter is not given, your sessions files library remains unchanged. However, because you selected libl for the second parameter, your session will start using the library-list support.

Tip 

The changes made by FLIB dont become effective immediately. The changes are deferred until the first-level procedure ends.

New OCL Statements

IBM created some OCL statements for the S/36 environment to allow ported S/36 applications to take advantage of native architecture. Here are two especially useful ones:

  • // FILELIB. Similar to the FLIB procedure, but more powerful. It has three keyword parameters:

    • NAME. Enter the name of the files library. You can also specify 0 if you want to use the default files library as defined by the CHGS36 command.

    • LIBL. Indicate if you want to use the library-list support. You must enter YES or NO. Only the current files library is searched if NO is specified.

    • SESSION. Indicate whether the values you are assigning to the NAME and LIBL parameters apply to current values or session values. YES means that they apply to your session; NO means that they apply to the current values.

  • // TIMERSET. This OCL statement lets you prepare your system for an automatic, unattended IPL at some future date and/or time; to prepare the system for automatic IPL after a power failure; or for remote IPL. Although useful, the function of the TIMERSET statement can be pro-grammed better using Operational Assistants Automatic Power Schedule (see Chapter 2).

Examples of TIMERSET:

         // TIMERSET TIMED-YES, DATE-050399, TIME-070000 

The above statement prepares the system for automatic, unattended IPL on May 3, 1999 at 7:00 a.m.

        // TIMERSET RESTART-YES 

This statement indicates that the system should re-IPL after a power failure.

        // TIMERSET REMOTE-YES 

This statement indicates that remote IPL should be allowed.

       // TIMERSET QUERY-YES 

This statement lists the current settings made with // TIMERSET in the current SYSLIST device.

Mixing OCL and CL in Procedures

S/36E procedures let you mix S/36E OCL and native CL commands within the statements. Native commands can be placed anywhere you can place the name of a procedure or an OCL statement, except between the // RUN and // END statements.

Each time a procedure encounters a new statement, it tries to execute it as an OCL statement first. If it is not an OCL statement, it tries to execute it as a pro-cedure. If it is not a procedure, it executes it as a native command. Thus, you cannot include commands that have the same name as an OCL statement or a procedure unless you qualify the command to force the OCL interpreter to recognize it as a command.

This qualification can be made using a command label or a library name (or *LIBL). For example, suppose you have a command named FILE (which matches the name of an OCL statement) and you want to run it in a procedure. Here are two ways to show that you wish to run a CL command:

       // X: FILE (uses a command label, X)       // *LIBL/FILE (uses a library qualifier, *LIBL) 

You can also mix OCL constructs within a native command. For example, an OCL statement such as the following is perfectly valid:

       // CRTLIB LIB(?1?) 

This statement uses the value of parameter 1 as the value to be passed to the LIB parameter of the native CRTLIB command. Here is another example:

       // EVALUATE P4='CRTLIB LIB(?5?)'       // ?4? 

The first statement assigns a command string with an embedded substitution expression that is evaluated first to parameter 4. If parameter 5 has the value MYLIB, P4 obtains the value CRTLIB LIB(MYLIB). The second statement exe-cutes that command.

Tip 

If the CL command ends in error, the ?MSGID? substitution expression will contain the ID of the *ESCAPE message issued by the CL command. If the CL command ends normally, ?MSGID? is blank. After executing a CL command, your OCL procedure can check ?MSGID? to see if the command executed correctly.

New Substitution Expressions

Four OCL substitution expressions have been created specifically for the S/36E. These are:

  • ?FLIB?, which returns the name of the current files library.

  • ??, which returns the name of the session files library.

  • ?MSGID?, which returns a native, seven-character message ID if the just-executed native command ended in error. If the command ends normally, ?MSGID? is blank.

  • ?DEVUNIT?, which returns the native, 10-character name of the device whose two-character unit is given. For example, ?DEVW1? returns the 10-character device name associated with S/36E device W1.



IBM i5/iSeries Primer(c) Concepts and Techniques for Programmers, Administrators, and Sys[... ]ators
IBM i5/iSeries Primer(c) Concepts and Techniques for Programmers, Administrators, and Sys[... ]ators
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 245

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net