Using other programming languages
Programming languages in addition to REXX and CLIST, such as Assembler, PL/I and COBOL, may be used to implement complex automation tasks.
These programs are called user-written programs. A user-written program is called only from an EXEC, is loaded from the BBILOAD library in the BBI-SS PAS, and must begin with the prefix IMFUxxxx to prevent a conflict with future MainView AutoOPERATOR program names.
At entry the program will be given a parameter list specifying the name of the EXEC, the originating BBI-SS PAS Address Space ID, and the contents of the parameter string.
Parameter | Description |
---|---|
WORD1 | a count of the number of parameters (to maintain compatibility with PL/I) This number is always 5. |
WORD2 | a pointer to an 8-character field containing the name of the EXEC scheduling the program, left-justified |
WORD3 | a pointer to a 4-character field containing the BBI-SS PAS Address Space ID of this BBI-SS PAS, left-justified |
WORD4 | the length of the parameter string pointed to by WORD5 |
WORD5 | a pointer to the parameter string |
WORD6 | a pointer to the TSO/E Environment Control Table (ECT) |
The user-written program gains control in a problem state and MainView AutoOPERATOR gives the program ESTAE protection. The execution of the calling EXEC is suspended until the user-written program terminates. The program inherits the APF authorization of the subsystem.
The following list describes the register contents on entry to a user-written program:
Register entry | Description |
---|---|
R1 | pointer to the parameter list |
R2 - R12 | unpredictable |
R13 | an 18-word save area |
R14 | the return address to MainView AutoOPERATOR |
R15 | the entry-point address of the user exit |
The KEY in which the user-written program is given control depends on the setting of the ALLOWUSERKEYCSA(YES|NO) parameter in SYS1.PARMLIB(DIAGxx) when MainView AutoOPERATOR PAS was started. The following list describes the key that the user-written program gains control of the program based on the setting in SYS1.PARMLIB(DIAGxx):
- # Key 4 if ALLOWUSERKEYCSA(NO) is specified.
- # Key 8 if ALLOWUSERKEYCSA(YES) is specified.
The high-order bit of the last word in the parameter list is set to 1. The program should be coded and link edited as re-entrant because it could be called from several tasks. If serialization is required, it must be provided by the user program that is using ENQ facilities of MVS. The program can be coded to execute in either 24-bit or 31-bit mode.
A user-written program can access and manipulate TSO variables. BMC Software recommends that you are familiar with TSO internals before running programs that will affect TSO variables. One documented programming interface for manipulating TSO variables is the IKJCT441 program.
The following table describes the register contents expected by MainView AutoOPERATOR when control is returned from the user-written program:
Register exit | Description |
---|---|
R15 | the return code made available to the calling EXEC in the BBI variable &IMFRC MainView AutoOPERATOR expects the program to return control in a problem state, and in the KEY that the user-written program gains control of the program based on the setting in SYS1.PARMLIB(DIAGxx):
If the program abends, IMFCC is set to 20. |