z/OS Assembler EXEC CICS commands


This page shows, with small examples, the objects that the extension creates for the EXEC CICS commands that use a CICS resource: a transient data (TD) queue, a file, a transaction or a map. Each command produces one object, named after the resource, child of the program (or of the copy member) that holds it, with a link from it. Universal Linker then links each of these objects to the CICS resource of that name.

The examples come from the program CICSPGM.asm.

TD queue commands

WRITEQ TD, READQ TD and DELETEQ TD commands produce one object each. The queue name is a literal, or the DC constant of a data area such as QNAME:

CICSPGM  CSECT
         EXEC  CICS WRITEQ TD QUEUE('TDQ1') FROM(REC) LENGTH(RECLEN)
         EXEC  CICS READQ TD QUEUE(QNAME) INTO(REC) LENGTH(RECLEN)
         EXEC  CICS DELETEQ TD QUEUE('TDQ3')
         EXEC  CICS WRITEQ TS QUEUE('TSQ1') FROM(REC) LENGTH(RECLEN)
QNAME    DC    CL4'TDQ2'
RECLEN   DC    H'80'
REC      DS    CL80
Caller type Caller Link Callee type Callee
z/OS Assembler Program CICSPGM call Link AssemblerZOS_CICS_ReadQ_TDQueue TDQ2
z/OS Assembler Program CICSPGM call Link AssemblerZOS_CICS_WriteQ_TDQueue TDQ1
z/OS Assembler Program CICSPGM call Link AssemblerZOS_CICS_DeleteQ_TDQueue TDQ3

In CAST Imaging:

asm_cics_td_queue_commands.svg

WRITEQ TS QUEUE('TSQ1') uses a temporary storage (TS) queue: it creates nothing, since Universal Linker links no TS queue. A command without the TD option uses a TS queue, as CICS does.

File commands

READ, WRITE, REWRITE and DELETE commands produce one object each. STARTBR, READNEXT and READPREV produce one browse object each. The file is named by the FILE option or by its synonym DATASET:

         EXEC  CICS READ FILE('CUSTFILE') INTO(REC) RIDFLD(KEY)
         EXEC  CICS WRITE DATASET('ORDFILE') FROM(REC) RIDFLD(KEY)
         EXEC  CICS REWRITE FILE(HISTNAME) FROM(REC)
         EXEC  CICS DELETE FILE('CUSTFILE') RIDFLD(KEY)
         EXEC  CICS STARTBR FILE('BRWSFILE') RIDFLD(KEY)
         EXEC  CICS READNEXT FILE('BRWSFILE') INTO(REC) RIDFLD(KEY)
         EXEC  CICS READPREV FILE('BRWSFILE') INTO(REC) RIDFLD(KEY)
HISTNAME DC    CL8'HISTFILEXX'
REC      DS    CL80
KEY      DS    CL8
Caller type Caller Link Callee type Callee
z/OS Assembler Program CICSPGM call Link AssemblerZOS_CICS_Read_Dataset CUSTFILE
z/OS Assembler Program CICSPGM call Link AssemblerZOS_CICS_Browse_Dataset BRWSFILE
z/OS Assembler Program CICSPGM call Link AssemblerZOS_CICS_Browse_Dataset BRWSFILE
z/OS Assembler Program CICSPGM call Link AssemblerZOS_CICS_Browse_Dataset BRWSFILE
z/OS Assembler Program CICSPGM call Link AssemblerZOS_CICS_Delete_Dataset CUSTFILE
z/OS Assembler Program CICSPGM call Link AssemblerZOS_CICS_Write_Dataset ORDFILE
z/OS Assembler Program CICSPGM call Link AssemblerZOS_CICS_Rewrite_Dataset HISTFILE

In CAST Imaging:

asm_cics_file_commands.svg

The constant CL8'HISTFILEXX' is 8 characters long, so the file name is HISTFILE.

Transaction commands

START, RETURN and CANCEL commands with a TRANSID option produce one object each:

         EXEC  CICS START TRANSID('TRN1')
         EXEC  CICS CANCEL TRANSID('TRN3')
         EXEC  CICS RETURN TRANSID(NEXTTRAN)
         EXEC  CICS RETURN
NEXTTRAN DC    CL4'TRN2'
Caller type Caller Link Callee type Callee
z/OS Assembler Program CICSPGM call Link AssemblerZOS_CICS_Start_Transaction TRN1
z/OS Assembler Program CICSPGM call Link AssemblerZOS_CICS_Cancel_Transaction TRN3
z/OS Assembler Program CICSPGM call Link AssemblerZOS_CICS_Return_Transaction TRN2

In CAST Imaging:

asm_cics_transaction_commands.svg

A RETURN without TRANSID creates nothing.

Map commands

SEND MAP and RECEIVE MAP commands produce one object each. The object keeps the mapset of the MAPSET option. When the command has no MAPSET option, the mapset is the map name, which is what CICS assumes:

         EXEC  CICS SEND MAP('MAP1') MAPSET('MAPSET1') FROM(MAPOUT)
         EXEC  CICS RECEIVE MAP(MAPNAME)                               X
               MAPSET(MSETNAME) INTO(MAPIN)
         EXEC  CICS SEND MAP('MAP2') FROM(MAPOUT) ERASE
         EXEC  CICS SEND TEXT FROM(MSG) LENGTH(MSGLEN) ERASE
         EXEC  CICS SEND CONTROL ERASE
MAPNAME  DC    CL7'MAP3'
MSETNAME DC    C'MAPSET3'
MSG      DC    C'HELLO'
MSGLEN   DC    H'5'
MAPOUT   DS    CL100
MAPIN    DS    CL100
Caller type Caller Link Callee type Callee Mapset
z/OS Assembler Program CICSPGM call Link AssemblerZOS_CICS_Send_Map MAP1 MAPSET1
z/OS Assembler Program CICSPGM call Link AssemblerZOS_CICS_Send_Map MAP2 MAP2
z/OS Assembler Program CICSPGM call Link AssemblerZOS_CICS_Receive_Map MAP3 MAPSET3

In CAST Imaging:

asm_cics_map_commands.svg

SEND TEXT and SEND CONTROL use no map: they create nothing.

How the resource name is read

The name of the resource is read from the argument of the command option:

  • a literal, such as FILE('CUSTFILE'), or a literal constant, such as FILE(=CL8'CUSTFILE');
  • a data area of the program defined by a DC constant, such as QUEUE(QNAME) with QNAME DC CL4'TDQ2'. Trailing blanks are removed, and the constant is cut to its length;
  • a data area defined in a copy member that the program copies;
  • for a command of a copy member, a data area of the program that copies it.

When the name cannot be found, the command creates nothing, and the analysis log shows the warning ASMZOS-005. This is the case for a data area without a DC constant, or with a value set at run time. An argument with a variable symbol, such as FILE(&FNAME), creates nothing either.

Data area of a copy member

CICSPGM.asm copies CICSCONS.asm, which defines the data area CONSNAME:

         EXEC  CICS READ FILE(CONSNAME) INTO(REC) RIDFLD(KEY)
         COPY  CICSCONS

CICSCONS.asm:

CONSNAME DC    CL8'CONSFILE'
CONSLEN  EQU   8
Caller type Caller Link Callee type Callee
z/OS Assembler Program CICSPGM call Link AssemblerZOS_CopyMember CICSCONS
z/OS Assembler Program CICSPGM call Link AssemblerZOS_CICS_Read_Dataset CONSFILE

In CAST Imaging:

asm_cics_data_area_of_a_copy_member.svg

Data area of the program that copies the copy member

CICSPGM.asm copies CICSFRAG.asm, whose command uses the data area FRAGQ of CICSPGM.asm:

CICSFRAG.asm:

         EXEC  CICS WRITEQ TD QUEUE(FRAGQ) FROM(REC) LENGTH(RECLEN)
         MVC   REC(4),=C'FRAG'

CICSPGM.asm:

FRAGQ    DC    CL4'TDQF'
         COPY  CICSFRAG
Caller type Caller Link Callee type Callee
z/OS Assembler Program CICSPGM call Link AssemblerZOS_CopyMember CICSFRAG
AssemblerZOS_CopyMember CICSFRAG call Link AssemblerZOS_CICS_WriteQ_TDQueue TDQF

In CAST Imaging:

asm_cics_data_area_of_the_copying_program.svg

The TDQF object is a child of the copy member CICSFRAG.

Data area without a constant

BADNAME has no DC constant: its value is only known at run time. The command creates nothing, and the analysis log shows the warning ASMZOS-005:

         EXEC  CICS READ FILE(BADNAME) INTO(REC) RIDFLD(KEY)
BADNAME  DS    CL8

Commands of a copy member

The EXEC CICS commands of a copy member used by a COPY statement produce objects that are children of the copy member, with a link from it. CODEPGM.asm copies CODECPY.asm (see Links from the code of a copy member), which also holds these commands:

         EXEC  CICS READQ TD QUEUE('CPQ2') INTO(REC)
         EXEC  CICS DELETEQ TD QUEUE('CPQ3')
         EXEC  CICS READ FILE('CPFILE1') INTO(REC)
         EXEC  CICS WRITE FILE('CPFILE2') FROM(REC)
         EXEC  CICS REWRITE FILE('CPFILE3') FROM(REC)
         EXEC  CICS DELETE FILE('CPFILE4')
         EXEC  CICS STARTBR FILE('CPFILE5')
         EXEC  CICS START TRANSID('CPT1')
         EXEC  CICS RETURN TRANSID('CPT2')
         EXEC  CICS CANCEL TRANSID('CPT3')
         EXEC  CICS SEND MAP('CPMAP1') MAPSET('CPSET1')
         EXEC  CICS RECEIVE MAP('CPMAP2') MAPSET('CPSET2')
Caller type Caller Link Callee type Callee
AssemblerZOS_CopyMember CODECPY call Link AssemblerZOS_CICS_Send_Map CPMAP1
AssemblerZOS_CopyMember CODECPY call Link AssemblerZOS_CICS_Receive_Map CPMAP2
AssemblerZOS_CopyMember CODECPY call Link AssemblerZOS_CICS_Read_Dataset CPFILE1
AssemblerZOS_CopyMember CODECPY call Link AssemblerZOS_CICS_ReadQ_TDQueue CPQ2
AssemblerZOS_CopyMember CODECPY call Link AssemblerZOS_CICS_Write_Dataset CPFILE2
AssemblerZOS_CopyMember CODECPY call Link AssemblerZOS_CICS_Browse_Dataset CPFILE5
AssemblerZOS_CopyMember CODECPY call Link AssemblerZOS_CICS_Delete_Dataset CPFILE4
AssemblerZOS_CopyMember CODECPY call Link AssemblerZOS_CICS_DeleteQ_TDQueue CPQ3
AssemblerZOS_CopyMember CODECPY call Link AssemblerZOS_CICS_Rewrite_Dataset CPFILE3
AssemblerZOS_CopyMember CODECPY call Link AssemblerZOS_CICS_Start_Transaction CPT1
AssemblerZOS_CopyMember CODECPY call Link AssemblerZOS_CICS_Cancel_Transaction CPT3
AssemblerZOS_CopyMember CODECPY call Link AssemblerZOS_CICS_Return_Transaction CPT2

In CAST Imaging:

asm_cics_commands_of_a_copy_member.svg

The commands of a macro file create no object: a macro definition is only a model of the code it generates. Its EXEC CICS LINK, XCTL and LOAD commands are still linked to their program, as shown below.

EXEC CICS LINK, XCTL and LOAD with a PROGRAM(data area) option are linked to the program named by the DC constant of the data area, like a CALL. SUBNAME names CICSSUB.asm, an Assembler program of the same analysis. COBNAME names CICSCOB, which is not part of the analysis:

         EXEC  CICS LINK PROGRAM(SUBNAME) COMMAREA(REC)
         EXEC  CICS XCTL PROGRAM(COBNAME)
SUBNAME  DC    CL8'CICSSUB'
COBNAME  DC    CL8'CICSCOB'

CICSSUB.asm:

CICSSUB  CSECT
         EXEC  CICS RETURN
         END   CICSSUB
Caller type Caller Link Callee type Callee
z/OS Assembler Program CICSPGM call Link z/OS Assembler Program CICSSUB
z/OS Assembler Program CICSPGM call Link z/OS Assembler Call to Generic Program CICSCOB

In CAST Imaging:

asm_cics_link_xctl_to_a_program.svg

The same is found in the IBM MQ sample program CSQCSPLT.asm, where CSQCQCON is not part of the analysis:

CSQCSPLT DFHEIENT
         EXEC CICS LINK PROGRAM(CSQCQCON)                              *
              COMMAREA(CONNPL) LENGTH(COMMLEN)                         *
              NOHANDLE
         EXEC CICS RETURN
CSQCQCON DC   CL8'CSQCQCON'
COMMLEN  DC   H'75'
         END     CSQCSPLT
Caller type Caller Link Callee type Callee
z/OS Assembler Program CSQCSPLT call Link z/OS Assembler Call to Generic Program CSQCQCON

In CAST Imaging:

asm_cics_link_csqcsplt.svg

A quoted name, such as PROGRAM('CICSSUB'), is linked the same way.

These cross-technology links are created by Universal Linker, not by this extension. Universal Linker matches the name of each command object, case-sensitively, with the CICS resources that the Mainframe Analyzer creates from the CSD definitions and the BMS map sources of the application. A map command is matched by its map name and its mapset.

For example, the commands of CICSPGM.asm above are linked to the resources of this CSD extract:

DEFINE TDQUEUE(TDQ1) GROUP(APPGRP)
DEFINE TDQUEUE(TDQ2) GROUP(APPGRP)
DEFINE TDQUEUE(TDQ3) GROUP(APPGRP)
DEFINE FILE(CUSTFILE) GROUP(APPGRP)
DEFINE FILE(ORDFILE) GROUP(APPGRP)
DEFINE FILE(HISTFILE) GROUP(APPGRP)
DEFINE FILE(BRWSFILE) GROUP(APPGRP)
DEFINE TRANSACTION(TRN1) GROUP(APPGRP) PROGRAM(CICSPGM)
DEFINE TRANSACTION(TRN2) GROUP(APPGRP) PROGRAM(CICSPGM)
DEFINE TRANSACTION(TRN3) GROUP(APPGRP) PROGRAM(CICSPGM)

and of these BMS maps:

MAPSET1  DFHMSD TYPE=MAP,LANG=ASM,MODE=INOUT
MAP1     DFHMDI SIZE=(24,80)
         DFHMSD TYPE=FINAL
         END
MAPSET3  DFHMSD TYPE=MAP,LANG=ASM,MODE=INOUT
MAP3     DFHMDI SIZE=(24,80)
         DFHMSD TYPE=FINAL
         END
Caller type Caller Link Callee type Callee
AssemblerZOS_CICS_Read_Dataset CUSTFILE accessRead Link CICS DataSet CUSTFILE
AssemblerZOS_CICS_Write_Dataset ORDFILE accessWrite Link CICS DataSet ORDFILE
AssemblerZOS_CICS_Browse_Dataset BRWSFILE accessRead Link CICS DataSet BRWSFILE
AssemblerZOS_CICS_Delete_Dataset CUSTFILE accessWrite Link CICS DataSet CUSTFILE
AssemblerZOS_CICS_Rewrite_Dataset HISTFILE accessWrite Link CICS DataSet HISTFILE
AssemblerZOS_CICS_ReadQ_TDQueue TDQ2 accessRead Link CICS Transient Data TDQ2
AssemblerZOS_CICS_DeleteQ_TDQueue TDQ3 accessWrite Link CICS Transient Data TDQ3
AssemblerZOS_CICS_WriteQ_TDQueue TDQ1 accessWrite Link CICS Transient Data TDQ1
AssemblerZOS_CICS_Start_Transaction TRN1 call Link CICS Transaction TRN1
AssemblerZOS_CICS_Cancel_Transaction TRN3 call Link CICS Transaction TRN3
AssemblerZOS_CICS_Return_Transaction TRN2 call Link CICS Transaction TRN2
AssemblerZOS_CICS_Send_Map MAP1 accessWrite Link CICS Map MAP1
AssemblerZOS_CICS_Receive_Map MAP3 accessRead Link CICS Map MAP3

In CAST Imaging:

asm_cics_links_to_the_cics_resources.svg

The SEND MAP(‘MAP2’) command has the mapset MAP2, which is not defined: it stays unresolved.