Previous Topic Next topic Print topic


MFJZS099

Enables you to use DYNamic ALLOCation (DYNALLOC - SVC99) functions.
Note: The following information does not apply if you are invoking SVC 99 via a z/OS Assembler routine that issues the SVC 99 machine instruction.

You invoke the Micro Focus SVC 99 API, MFJZS099, as follows (skeletal code only is shown):

copy idas99rb replacing ==()== by ==s99rb==.
copy idas99tu replacing ==()== by ==s99tu==. 
  1 caller-id.
  3 caller-id-char       pic x(04) value 'S099'.
  3 caller-id-ptr  pointer.     *> ptr to s99rb
  3 caller-id-bin pic 9(8) comp value 1.
  3 caller-id-float      comp-1 value 1.
1.
    3 tu-ptr-list.
    5 tu-ptr-ddn   pointer.
    5 tu-ptr-dsn    pointer.
    5 etc       pointer. 
   3	  pic x(4) value
       --either—(1)
       x’80000000’    
       --or--  (2)     
          s99rb-last-ptr-val-x4-val. 
   
     move low-values to s99rb
      --either— (3)
     move s99rb-len-host to s99rb-len
      --or--  (4)
     move s99rb-len-mf-ext to s99rb-len
     move s99rb-last-ptr-val-x4-val to s99rb-last-ptr-val-x4
      --and--
     set s99rb-s99tu-array-ptr to address tu-ptr-list
     set caller-id-ptr to address s99rb

     call 'MFJZS099' using  s99rb
         caller-id    
         returning s99rb-retc

    if s99rb-retc = 0 
      *> SVC99 ok    
    else      
      *> SVC99 not ok – check for errors
    end-if

The parameters are:

SVC 99 Request Block (mapped by IDAS99RB.CPY)
You may use IDAS99TU.CPY to assist you in the construction of the Text Units (TUs).
Caller-id
While this parameter (caller-id) is recommended, COBOL programs compiled as INTs and GNTs can omit it. For non-COBOL programs, it is required and is used by the SVC 99 handler to interpret format of addresses and CHARSET of the character data, Binary data must always be in z/OS (Big-Endian) format.
retcode

Return value in retcode will be the SVC99 return code value that would have been placed in the general purpose register 15. All other error and info codes are stored in SVC99RB.

SVC99 uses the high-order bit of a TU (Text Unit) address to interpret it as the last TU address in the TU address array.

If the calling program is compiled with AMODE, you need not make any changes. It is recommended that you use a null address to signify the last address, that is, set TU last address to x’80000000’ (see (1) in the example above).

When the calling program is compiled with NOAMODE, the high order bit of a TU (Text Unit) address will not be interpreted as an indication of the last address in the TU pointer array. In this case, you have one of two options:

  1. Make sure the last TU address is indicated by a value of either x’80000000’ or x’00000080’ (see (1) and (3) in the example above). This will keep the source compatible with the host. If either of these could potentially be a legitimate address on the computer you are running on, then option 2 is the only other alternative.
  2. Specify a specific last address value of your choice in the extension portion of the SVC99 Request Block (S99RB) (see (2) and (4) in the example above).

Examples

The following program is running with NOAMODE in effect:

copy idas99rb replacing ==()== by ==s99rb==.
copy idas99tu replacing ==()== by ==s99tu==. 
  1 caller-id.
    3 caller-id-char       pic x(04) value 'S099'.
    3 caller-id-ptr  pointer.     *> ptr to s99rb
    3 caller-id-bin pic 9(8) comp value 1.
    3 caller-id-float      comp-1 value 1.
  1  .
    3 tu-ptr-list.
      5 tu-ptr-ddn   pointer.
      5 tu-ptr-dsn    pointer.
      5 etc       pointer. 
     4	pic x(4) value
                  s99rb-last-ptr-val-x4-val. 
           
           move low-values to s99rb
           move s99rb-len-mf-ext to s99rb-len
           move s99rb-last-ptr-val-x4-val to s99rb-last-ptr-val-x4
           set s99rb-s99tu-array-ptr to address tu-ptr-list
           set caller-id-ptr to address s99rb

call 'MFJZS099' using  s99rb
                   caller-id
                   returning s99rb-retc
            if s99rb-retc = 0 
                    *> SVC99 ok            
            else      
                    *> SVC99 not ok – check for errors
            end-if

The following program is running with AMODE in effect:

copy idas99rb replacing ==()== by ==s99rb==.
copy idas99tu replacing ==()== by ==s99tu==. 
  1 caller-id.
    3 caller-id-char       pic x(04) value 'S099'.
    3 caller-id-ptr  pointer.     *> ptr to s99rb
    3 caller-id-bin pic 9(8) comp value 1.
    3 caller-id-float      comp-1 value 1.
  1  .
    3 tu-ptr-list.
      5 tu-ptr-ddn   pointer.
      5 tu-ptr-dsn    pointer.
      5 etc       pointer. 
      5 pic x(4) value x’80000000’.    
 
   move low-values to s99rb
   move s99rb-len-host to s99rb-len
   set s99rb-s99tu-array-ptr to address tu-ptr-list
   set caller-id-ptr to address s99rb

   call 'MFJZS099' using  s99rb
       caller-id
       returning s99rb-retc
    if s99rb-retc = 0 
       *> SVC99 ok    
    else      
       *> SVC99 not ok – check for errors
    end-if
Previous Topic Next topic Print topic