ASAM PCB mask


An application program must define one ASAM PCB mask for each ASAM data set it accesses. The application program uses the ASAM PCB mask to check the status code that 

AR/CTL

 returns to report the results of an ASAM data set call. The ASAM PCB mask contains the same fields in the same order as defined in the ASAM PCB. The following table describes the fields in the ASAM PCB mask.

ASAM PCB mask fields

Field

Length (bytes)

Offset (bytes)

Description

database name

8

0

ddname of the ASAM data set

reserved

2

8

retained for compatibility with IMS

status code

2

10

status code that describes the results of the call

AR/CTL places a status code in this field after each call to the ASAM data set. The application program should check the status code to determine whether the call was successful.

processing option

4

12

processing option code that defines the types of calls the application program can issue

The value in this field is the value of the PROCOPT parameter on the ARCPCB or PCB statement in the ASB or PSB. This value does not change during application program execution.

reserved

4

16

retained for compatibility with IMS

reserved

8

20

retained for compatibility with IMS

field length

4

28

decimal value 12

The value in this field is the sum of the lengths of the record search argument fields and undefined-length records area field in the ASAM PCB mask.

reserved

4

32

retained for compatibility with IMS

record search argument area

8

36

the address of the record that AR/CTL returned as the result of a get-type call

To retrieve this record directly, you can use the address of a field containing this RSA as one of the parameters of a get unique (GU) call.

length of undefined-length records

4

42

if the ASAM data set has an undefined record format (RECFM=U), the binary length of the record being processed

For GU or GN calls, AR/CTL places the binary length of the retrieved record in this field. For ISRT calls, the application program must place the binary length of the inserted record in this field before issuing the ISRT call.

When 

AR/CTL

 returns control to the application program, it places a two-byte status code in a field of the ASAM PCB to report the results of the call. The application program should check this status code field after each call. 

AR/CTL

 supports all status codes that IMS supports for GSAM. This section describes only the codes that 

AR/CTL

 issues in an IMS compatible program. For codes that IMS issues, see the appropriate IMS documentation.

ASAM can provide the same RSA that IMS returns to the application program for GSAM. ASAM returns the RSA only when the call parameter list contains a request to return the RSA.

Define the ASAM PCB mask as a level 01 linkage section entry. The following example shows a typical ASAM PCB mask in COBOL:

LINKAGE DIVISION.
...
01 ASAMPCB.
   02 ASAMPCB_NAME  PICTURE X(8).
   02 FILLER        PICTURE XX.
   02 ASAM-STATUS   PICTURE XX.
   02 PROCOPT       PICTURE X(4).
   02 RESERVE       PICTURE S9(5) COMPUTATIONAL.
   02 FILLER        PICTURE X(8).
   02 LEN_FLDS      PICTURE S9(5) COMPUTATIONAL.
   02 FILLER        PICTURE S9(5) COMPUTATIONAL.
   02 RSA.
      05 RSA-1 PICTURE X(4).
      05 RSA-2 PICTURE X(4).
   02 UREC_LEN      PICTURE S9(5) COMPUTATIONAL.


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC AMI Application Restart Control for Db2, IMS and VSAM 4.2