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
In CAST Imaging:
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
In CAST Imaging:
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'
In CAST Imaging:
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
In CAST Imaging:
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 asFILE(=CL8'CUSTFILE'); - a data area of the program defined by a
DCconstant, such asQUEUE(QNAME)withQNAME 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
In CAST Imaging:
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
In CAST Imaging:
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')
In CAST Imaging:
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 and XCTL to a program
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
In CAST Imaging:
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
In CAST Imaging:
A quoted name, such as PROGRAM('CICSSUB'), is linked the same way.
Links to the CICS resources
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
In CAST Imaging:
The SEND MAP(‘MAP2’) command has the mapset MAP2, which is not defined: it stays unresolved.