IMS

Information Management System (IMS) is a hierarchy database built with the capability to process the extensive transactions. AWS Blu Insights support following statements in IMS.

Program Specification Block (PSB) File

PCB TYPE

PSB uses Program Communication Block (PCB) to define the database to be accessed by the application program. The database information is stored in the Database Description (DBD) file.

  • label PCB TYPE=DB,DBDNAME=dbd-file
  • label PCB TYPE=GSAM,DBDNAME=dbd-file
  • label PCB TYPE=DB,NAME=dbd-file
  • label PCB TYPE=GSAM,NAME=dbd-file

Where dbd-file is the name of the DBD file and label is the optional.

MFS

COPY

label COPY mfs-file

These statements imply a dependency, typed COPY, with another MFS file or a CPY file named mfs-file. label term is optional.

MOD/MID definition

  • CEM01O MSG TYPE=OUTPUT,SOR=(CEM01,IGNORE),NXT=CEM01I
  • CEM01I MSG TYPE=INPUT,SOR=(CEM01,IGNORE)

The first statement defines a message output definition (MOD) named CEM01O and the second a message input definition (MID) named CEM01I. Those objects can be used from Cobol file by using CBLTDLI system utility as follows.

CALL 'CBLTDLI' USING
	IM-PARM-COUNT
	IM-CALL-FUNC IO-PCB
	TP-SEGMENT
	'CEM01O'.

System Definition - Stage1

APPLCTN Macro

The APPLCTN macro defines an application program to IMS. It specifies the Program Specification Block (PSB) and the program type.

Basic Syntax

APPLCTN PSB=psbname,PGMTYPE=(type)

Where:

  • psbname is the name of the PSB
  • type defines the program type (TP, BATCH, etc.)

Example

APPLCTN PSB=TESTP,PGMTYPE=(TP)

TRANSACT Macro 

The TRANSACT macro defines transaction codes that are processed by the application program. This statement creates the dependency between the IMS Stage1 macro and the IMS transaction object.

Basic Syntax

TRANSACT CODE=trancode

Where:

  • trancode is the transaction code used to invoke the program

Example

TRANSACT CODE=IMSTRX1

APPLCTN <-> TRANSACT Relationship

Limitation

  • TRANSACT must be linked to APPLCTN only when PGMTYPE=TP
  • TRANSACT must immediately follow its associated APPLCTN
  1. Supported Structure:

    APPLCTN PSB=TESTP,PGMTYPE=(TP)
         TRANSACT CODE=IMSTRX1    // Directly follows APPLCTN                                                 
  2. Unsupported Structure:

    APPLCTN PSB=TESTP,PGMTYPE=(TP)
        [other statements]        // Not allowed here
        TRANSACT CODE=IMSTRX1    // Invalid placement                                                           

Here, dependency link established from the IMS Stage1 macro to the IMS Transaction object and from the IMS Transaction object to the Cobol program. Cobol program should be same name as the PSB program.

The IMS Stage1 macros establish important dependency relationships:

  1. IMS Stage1 macro → IMS Transaction object
  2. IMS Transaction object → COBOL program

When PGMTYPE=TP:

  • PSB name (TESTP) should match the COBOL program name
  • Creates a traceable path: Stage1 → Transaction → Program

Notes

  • Multiple TRANSACT statements can follow a single APPLCTN
  • The relationship is only established when PGMTYPE=TP
  • Transaction codes must be unique across the IMS system