AWS Transform for mainframe refactor dependencies for GS21 is part of the Mainframe group. This means that the statements listed below complement the other supporting technologies within the mainframe group; specifically Cobol.
The FORMAT statement is used within a GS21 Cobol program to specify the report format in a PSAM file.
The FORMAT statement implies a dependency on a PSAM file.
FORMAT IS <FMTID> where <FMTID> is the name of a PSAM file. <FMTID> could be a variable or a constant if it is included between double quotes.The link created between the GS21 Cobol program and the PSAM file will be of type "Format specification".
A GS21 Cobol program can reference a Sub-schema.
The SUBSCHEMA-NAME statement implies a dependency on a Subschema object.
SUBSCHEMA-NAME . '<subschema-name>' .The link created between the GS21 Cobol program and the Subschema object will be of type "Subschema".
A PSAM (screen) definition file dispatches to programs and navigates to other screens through DIST ... PARM=(...) statements.
The DIST statement implies dependencies on Cobol or PL/1 programs and on other PSAM files.
'P.<program-name>' in a PARM list implies a dependency of type "PSAM Dispatch" on a Cobol or PL/1 program named <program-name>'F.<psam-name>' in a PARM list implies a dependency of type "PSAM Navigate" on a PSAM file named <psam-name>A Subschema is defined in an ADL file. A Subschema can reference multiple Schema objects.
The SUBSCHEMA NAME IS statement implies a dependency on Schema objects.
SUBSCHEMA NAME IS <subschema>;
SCHEMA NAME IS <schema1>,
<schema2>;In this example, two links of type "Schema" will be created from the subschema <subschema> to the two schemas <schema1> and <schema2>.
The schema list can also be written without NAME IS, one schema per line, the continuation lines being indented:
SUBSCHEMA <subschema> ;
SCHEMA <schema1>,
<schema2>,
<schema3>.In this example, three links of type "Schema" will be created from the subschema <subschema> to the schemas <schema1>, <schema2> and <schema3>.
A PED object can reference a Dataset.
The PED NAME IS ... DATASET NAME IS ... statement implies a dependency on a Dataset object.
PED NAME IS <PED-name>;
...
DATASET NAME IS <dataset>The link created between the PED object and the dataset object will be of type "Dataset".
A PROC (Procedure) is defined in an ADL file.
The PROC NAME IS PROC1 ... SMQN IS SMQN1 ... statement implies a dependency on a Queue object.
PROC NAME IS <proc-name>
...
ON OUTSESSION NOTIFIED SMQN IS <smqn-name>. The link created between the PROC object and the queue object will be of type "Queue".
An ADL file can include a copybook.
The -INC statement implies a dependency on a copybook file.
-INC <copybook>The link created between the ADL file and the copybook will be of type "Copy".
ACSGEN (Application Control System Generation) files are configuration files that define application structure and behavior through organized sections.
The MENU section is used to configure menu structures and navigation patterns between PSAM files in ACSGEN configuration files.
MENU MEMBER=QMENU
...
MENUGENIt primarily contains SCHEDULE and UKEY commands. The SCHEDULE and UKEY commands operate in conjunction to create a hierarchical structure for PSAM files.
It defines the parent and creates the primary dependency between the ACSGEN file and the PSAM file.
SCHEDULE FID=(PARENT_PSAM_FILE,PSWD)SCHEDULE FID=PARENT_PSAM_FILEIt defines the child and creates secondary dependencies between the parent PSAM file defined in SCHEDULE and child PSAM files specified by the UKEY FID parameter.
UKEY FID=CHILD_PSAM_FILE_1UKEY FID=CHILD_PSAM_FILE_NHierarchical Structure
SCHEDULE FID=PARENT_PSAM_FILE
├── UKEY FID=CHILD_PSAM_FILE_1
├── UKEY FID=CHILD_PSAM_FILE_2
└── UKEY FID=CHILD_PSAM_FILE_NThe MCP section is used to define application control parameters. MCP elements are configured with multiple commands including SCHEDULE, VDS, and ODS. For example:
MCP MCPID=PM2,OCCURS=(15,1),TASKLOG=500,BOF=(100,1000),RCV=YES,TIME=600000
...
MCPGENThe MCPID parameter specifies the MCP identifier, while system parameters like OCCURS, TASKLOG, BOF define resource allocation.
The SCHEDULE command defines the association between a PSAM file and its COBOL program. It establishes a "Process screen" dependency where the COBOL program is the parent and the PSAM file is the child.
SCHEDULE FID=PSAM_FILE_NAME,PGM=COBOL_PROGRAM_NAMEThe VSAM Data Set (VDS) command is used to configure and access VSAM datasets on mainframe systems. In the ADL file, "VDS" elements are configured with parameters such as SCHEMA, ACCESNM, and MODE. For example:
VDS SCHEMA=SCHEMAFILE,ACCESNM=ACC21,MODE=READONLYIn this command, "SCHEMAFILE" is the SCHEMA name, which identifies the VSAM dataset. The ACCESNM parameter specifies an access name or alias ("ACC21") for the VSAM dataset. This access name is then used in programs to establish a link to the SCHEMA and, consequently, to the VSAM dataset.
For instance:
SELECT ZK-V11 ASSIGN TO ACC21The MODE parameter determines the access mode for the VSAM dataset, such as READONLY, which prevents modifications to the data stored within it.
The VDS command plays a crucial role in managing and accessing VSAM datasets, enabling mainframe applications to read and process data stored in these datasets while adhering to specified access modes and configurations.
The ODS (Other Data Set) command is used to configure and access VSAM data sets on mainframe systems. In configuration files, ODS elements are defined with parameters such as DSNAME, ACCESNM, and OSF to specify the dataset name, access alias, and data set type (VSAM), respectively.
For example:
ODS DSNAME=P.K.DATASET,ACCESNM=ACCV11,OSF=VSAMThe ACCESNM parameter specifies an access name or alias (ACCV11) for the VSAM data set. This access name is then used in programs to establish a link to the data set for reading or writing data. For instance:
SELECT PK-V11 ASSIGN TO ACCV11The ODS command allows mainframe applications to manage and access VSAM data sets by defining the dataset name, access alias, and data set type, enabling efficient data storage and retrieval while adhering to specified configurations.
The DB command names the ADL (database definition) used by the application. It implies a dependency on an ADL file, typed "Read database" or "Update database" according to the access mode.
DB NAME=<adl-name>,...
DB NAME=<adl-name>,...,MODE=(UPDATE),...Where <adl-name> is the name of an ADL file in the project. MODE=(UPDATE) or MODE=UPDATE selects "Update database"; any other value (MODE=(RETRIEVE), …) or no MODE selects "Read database". An ADL file that is not in the project is reported as "Missing ADL".
The ADS command names the schema (SCH file) accessed by the application. It implies a dependency on a SCH file, typed "Read schema" or "Update schema" according to the access mode, with the same MODE rule as DB.
ADS SCHEMA=<sch-name>,...
ADS SCHEMA=<sch-name>,...,MODE=(UPDATE),...Where <sch-name> is the name of a SCH file in the project. A SCH file that is not in the project is reported as "Missing Schema File".
ACSGEN statements follow the fixed-format continuation rule: a non-blank character in column 72 continues the statement on the next line, so a MODE= written on a continuation line is taken into account. Comment lines (* in column 1) and blank lines inside a continued statement are ignored.
Example:
DB NAME=SBO01,PAGEBUF=5,INDXBUF=1,XIFBUF=5, C
MODE=(UPDATE),BUFSHR=ALL
ADS SCHEMA=SCDAMO41,ACCESNM=O41EWKSE,DSBUFF=5, C
MODE=(UPDATE)Creates:
{
"dependencyType": "Update database",
"name": "SBO01.adl",
"path": "adl/SBO01.adl",
"type": "ADL"
}and
{
"dependencyType": "Update schema",
"name": "SCDAMO41.sch",
"path": "sch/SCDAMO41.sch",
"type": "SCH"
}A JCL can reference a PED object through the AIMPED statement.
The //AIMPED ... <PED-name>... statement implies a dependency on a PED object.
//AIMPED DD SUBSYS=(AIM,<PED-name>,...)The link created between the JCL file and the PED object will be of type "Program environment definition".
In a JCL XSP file (statements prefixed with ¥), an FD statement whose SUBSYS operand names the AIM subsystem references a PED object.
¥ FD ...,SUBSYS=(AIM,<PED-name>)
¥ FD ...,SUBSYS=(AIM,<PED-name>,<other parameters>)The link created between the JCLXSP file and the PED object will be of type "Program environment definition", as for the AIMPED statement of a classic JCL. A PED that is not defined in the project (see PED NAME IS) is reported as "Missing Ped".
Example:
¥ FD AIMPED=SSI,SUBSYS=(AIM,PD037000,APG01)
Creates:
{
"dependencyType": "Program environment definition",
"name": "PD037000",
"path": "Global:PED:PD037000",
"type": "PED"
}A JCL XSP file can chain another JCL XSP file with the ¥=¥¥ statement.
¥=¥¥ <jclxsp-name>Where <jclxsp-name> is the name of a JCLXSP file in the project. The link created between the two JCLXSP files will be of type "Include JCL XSP". A file that is not in the project is reported as "Missing JCL XSP".
Example: ¥=¥¥ OES101T
Creates:
{
"dependencyType": "Include JCL XSP",
"name": "OES101T.jclxsp",
"path": "jclxsp/OES101T.jclxsp",
"type": "JCLXSP"
}A JCLXSP file defines applications through the APL statement.
The APL NAME=... statement implies a dependency on Cobol programs.
APL NAME=<program>,LOADMODE=LOAD,RENAME=<alias>The link created between the JCLXSP file and the program <program> will be of type "Define Application". When RENAME= is present, a second link of the same type is created to the program <alias>. A program that is not in the codebase is reported as "Missing Source File".
01 ACSAPI-RECORD.
03 DTYPE PIC S9(4) VALUE 4096 COMP.
03 FUNC PIC X(2) VALUE SPACE.
03 NAME PIC X(8) VALUE SPACE.
03 FMID PIC X(8) VALUE SPACE.
ACSAPI-PROGRAM-FIELD refers to it in the rest of the documentation.ACSAPI-PSAM-FIELD refers to it in the rest of the documentation.The ACSAPI-RECORD structure can be defined in COBOL in the WORKING-STORAGE SECTION or using a COPY statement in a Copybook file. The name of this structure can be any valid COBOL name.
Documentation link.
The MOVE statement is used to assign values to ACSAPI-RECORD attributes using the following syntax:
MOVE 'value' TO ATTRIBUTE OF ACSAPI-RECORD
CALL 'ACSAPI' USING parameter1, ACSAPI-RECORD...
Where parameter1 is a variable that can be the SWITCH or MSGPUT option.
Based on parameter1 value:
ACSAPI-PROGRAM-FIELD of the record ACSAPI-RECORDACSAPI-PSAM-FIELD of the record ACSAPI-RECORDWORKING-STORAGE SECTION.
01 ACSAPI-RECORD.
03 DTYPE PIC S9(4) VALUE 4096 COMP.
03 FUNC PIC X(2) VALUE SPACE.
03 NAME PIC X(8) VALUE SPACE.
03 FMID PIC X(8) VALUE SPACE
PROCEDURE DIVISION.
MOVE "cobol_file" TO NAME OF ACSAPI-RECORD
CALL "ACSAPI" USING SWITCH
ACSAPI-RECORD.
This creates a COBOL program dependency to cobol_file with type ACSAPI
WORKING-STORAGE SECTION.
01 ACSAPI-RECORD.
03 DTYPE PIC S9(4) VALUE 4096 COMP.
03 FUNC PIC X(2) VALUE SPACE.
03 NAME PIC X(8) VALUE SPACE.
03 FMID PIC X(8) VALUE SPACE
PROCEDURE DIVISION.
MOVE "cobol_file" TO NAME OF ACSAPI-RECORD
MOVE "psam_file" TO FMID OF ACSAPI-RECORD
CALL "ACSAPI" USING MSGPUT
ACSAPI-RECORD.
This creates a PSAM file dependency to psam_file with type ACSAPI