Previous Topic: Changing Billing Groups OnlineNext Topic: Tailoring Screens, Task Codes, and Entry Options


Changing Billing Groups Through a Program

An application program running under a DC/UCF system can maintain billing groups through a program call to PMAMBL10, a module supplied with the Application Monitor.

PMAMBL10 functions

Two functions are available with the PMAMBL10 interface:

These functions are useful when:

PMAMBL10 interface record

Programs that use PMAMBL10 require the following interface record (shown for COBOL):

01 BILLING-INTERFACE-RECORD.
   05 BILLING-RECORD-LENGTH   PIC 9(4) USAGE COMP  VALUE 24.
   05 BILLING-RECORD-VERSION  PIC 9(4) USAGE COMP  VALUE 1.
   05 BILLING-RECORD-FUNCTION PIC X(4) USAGE DISPLAY.
         88  GET-BILL          VALUE 'GETB'.
         88  SET-BILL          VALUE 'SETB'.
   05 BILLING-GROUP-RETCODE   PIC X(4) USAGE DISPLAY.
         88  GOOD-RETURN       VALUE 'RBOK'.
         88  NO-USER-SIGNED-ON VALUE 'RBNS'.
         88  BAD-RECORD        VALUE 'RBBP'.
   05 BILLING-GROUP           PIC X(12).

Description of fields

Billing group return codes

Code

Meaning

RBOK

Processing was successfully completed

RBNS

No user was signed on, so no action was taken

RBBP

The interface record contains an invalid length (should be 24), version (should be 1), or function (should be GETB or SETB)

Passing control to PMAMBL10

When the program initializes fields in the interface record, it passes control to PMAMBL10. When the program receives control back from PMAMBL10, it examines the contents of BILLING-GROUP-RETCODE for the status of the requested operation.

COBOL example

PROCEDURE DIVISION.
    .
    .
    .
MOVE 24 TO BILLING-RECORD-LENGTH.
MOVE 1 TO BILLING-RECORD-VERSION.
MOVE 'AUDITING    ' TO BILLING-GROUP.
MOVE 'SETB' TO BILLING-RECORD-FUNCTION.
TRANSFER CONTROL TO 'PMAMBL10'
LINK USING BILLING-INTERFACE-RECORD.
    .
    .
    .
IF GOOD-RETURN . . .

CA ADS example

MOVE 'AUDITING    ' TO BILLING-GROUP.
MOVE 'SETB' TO BILLING-RECORD-FUNCTION.
LINK TO PROGRAM 'PMAMBL10'
      USING (BILLING-INTERFACE-RECORD).
IF GOOD-RETURN . . .