-- snip --
Does anyone have any Rexx that calls ERBSMFI directly?
-- snip --

For starters (DEVICE section - but basically the same for other sections)



/*
    Use RMF and SMF79 record to get volume information

    ERBSMFI requires that RMF monitor I is up and running
*/

rmf_data : nop

bufsize    = 900000                    /* Size of SMF record buffer  */
smfi_buf   = copies(' ',bufsize)       /* Initialize buffer          */
smfi_req   = D2C(1,4)                  /* Binary: request type=1     */
smfi_rec   = D2C(79,4)                 /* Binary: record type=79     */
smfi_bufl  = D2C(bufsize,4)            /* Binary: buffer length      */

smfi_sub   = D2C(9,4)                  /* Subtype 9                  */
smfi_cpu   = D2C(99999,4)              /* Init cpu utilization       */
smfi_pag   = D2C(99999,4)              /* Init paging rate           */
smfi_parm  = D2C(9,2)!!'0000:FFFF'

Address "LINKPGM" "ERBSMFI" ,
    "smfi_req smfi_rec smfi_sub smfi_buf smfi_bufl smfi_cpu smfi_pag "
smfi_rc = Rc                           /* Save return code           */

if rc <> 0                          /* most likely no RMF I running */
  then do
/*
    rc = 32 means that RMF is not running. Start RMF Monitor I
    rc = 28 means the smf buffer was too small. Increase bufsize
*/
    smfrc = smfi_rc
    exit (smfi_rc)
  end

                                       /* Device data section        */

data_sect  = X2D(C2X(substr(smfi_buf,45,4)))
data_len   = X2D(C2X(substr(smfi_buf,49,2)))
data_numb  = X2D(C2X(substr(smfi_buf,51,2)))

loop_start = data_sect + 1
loop_end   = loop_start + (data_len * data_numb)

--
John

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to