Language task: Assembler.yaml
Description
This sample provides the language task configuration to compile Assembler programs for the MortgageApplication sample. It is imported via Languages.yaml.
Configuration notice
If you are using the ready-to-use Assembler language script, you might need to add datasets to your Languages.yaml
as described in Configuring Extra Datasets for Samples.
Actions
- Define sources.
- Define variables.
- Create datasets.
- Loop through steps for each build file.
- Copy build file and dependencies to datasets.
- Optionally preprocess SQL.
- Optionally preprocess CICS.
- Compile Assembler using the ASMA90 compiler.
- Optionally debug side file.
- Optionally Link-edit.
Define sources
Define sources
as a list of file patterns to locate Assembler programs within the build list.
sources:
- "**.asm"
Task variables
Required variables
SQLTranslatorParms
Type: String
Default: HOST(ASM)
SQL translator parameters.
CICSTranslatorParms
Type: String
Default: ""
CICS translator parameters.
assemblerParms
Type: String
Default: LIST
Conditional variable builds Assembler parms, appending additional options based on build file.
- name: assemblerParms
value: LIST
append:
- condition:
exists: errPrefix
value: ADATA,EX(ADX(ELAXMGUX))
- condition:
exists: debug
notExits: errPrefix
eval: ${debug}
value: ADATA
debugSideFileParms
Type: String
Default: "(ASM ERROR LOUD"
Parameters to debug side file.
doLinkEdit
Type: boolean
Default: true
Flag to execute linkedit step.
linkEditParms
Type: String
Default: MAP,RENT,COMPAT(PM5)
Link-edit parameters.
dependencySearchPath
Type: String
Default: search:\${WORKSPACE}/?path=\${APP_DIR_NAME}/maclib/**.mac
Dependency search path for a single repository build.
scanLoadModule
Type: boolean
Default: true
Flag to scan load module for static link dependencies.
CICSTranslatorDDNameSubstitionList
Type: String
Default: ""
Conditionally set to SYSLIN,,,SYSLIB,SYSCIN,,,,,,,,,,,,,,
when evaluating an SQL program.
Note: You may need to use DD name substitution.
assemblerDDNameSubstitionList
Type: String
Default: ""
Conditionally set to SYSLIN,,,SYSLIB,SYSPUNCH,,,,,,,,,,,,,,
when evaluating a CICS program, or SYSLIN,,,SYSLIB,SYSCIN,,,,,,,,,,,,,,
when evaluating an SQL
program.
Note: You may need to use DD name substitution.
isIMS
Type: boolean
Default: false
Flag to activate IMS options.
isAsmaOptionsFile
Type: boolean
Default: false
Flag to use ASMAOPTS options.
Create datasets
Create datasets that must exist and be validated prior to compile.
datasets:
- name: ${HLQ}.ASM
options: cyl space(1,1) lrecl(80) dsorg(PO) recfm(F,B) dsntype(library)
- name: ${HLQ}.OBJ
options: cyl space(1,1) lrecl(80) dsorg(PO) recfm(F,B) dsntype(library)
- name: ${HLQ}.DBRM
options: cyl space(1,1) lrecl(80) dsorg(PO) recfm(F,B) dsntype(library)
- name: ${HLQ}.MACRO
options: cyl space(1,1) lrecl(80) dsorg(PO) recfm(F,B) dsntype(library)
- name: ${HLQ}.LOAD
options: cyl space(1,1) dsorg(PO) recfm(U) blksize(32760) dsntype(library)
- name: ${HLQ}.SYSADATA
options: cyl space(5,5) lrecl(32756) dsorg(PO) recfm(v,b) blksize(32760) dsntype(library)
- name: ${HLQ}.EQALANGX
options: cyl dsorg(PO) dsntype(library) space(5,5) blksize(27998) lrecl(1562) recfm(v,b)
Task steps
For each build file, the following steps will be executed.
Copy step
The copySrc
copy step copies the current build file from its HFS source to the //'${HLQ}.ASM(${MEMBER})'
dataset along with any dependencies.
- step: copySrc
type: copy
source: ${WORKSPACE}/${FILE}
target: //'${HLQ}.ASM(${MEMBER})'
dependencyCopy:
- search: ${dependencySearchPath}
mappings:
- source: "**/*"
dataset: ${HLQ}.MACRO
SQL translator step
The SQLTranslator
mvs step calls DSNHPC
to preprocess files that have been scanned or declared as SQL.
- step: SQLTranslator
condition: ${IS_SQL}
type: mvs
pgm: DSNHPC
parm: ${SQLTranslatorParms}
maxRC: 4
dds:
- { name: "SYSIN", dsn: "${HLQ}.ASM(${MEMBER})", options: "shr", input: true }
- { name: "DBRMLIB", dsn: "${HLQ}.DBRM(${MEMBER})", options: "shr", output: true, deployType: "DBRM" }
- { name: "SYSCIN", dsn: "&&SYSCIN", options: "cyl space(5,5) unit(vio) new", pass: true }
- { name: "TASKLIB", dsn: "${SDSNLOAD}", options: "shr" }
- { dsn: "${SDSNEXIT}", condition: { exists: "SDSNEXIT" }, options: "shr" }
- { name: "SYSPRINT", log: "${LOGS}/${STEP}-${FILE_NAME}.asm.log", options: "cyl space(5,5) unit(vio) blksize(400) lrecl(80) recfm(f,b) new ", append: true }
- { name: "SYSUT1", options: "cyl space(5,5) unit(vio) blksize(80) lrecl(80) recfm(f,b) new" }
CICS translator step
The CICSTranslator
mvs step calls DFHEAP1\$
to preprocess files that have been scanned or declared as CICS.
- step: CICSTranslator
condition: ${IS_CICS}
type: mvs
pgm: DFHEAP1$
parm: ${CICSTranslatorParms}
maxRC: 4
ddnameSubstitution: ${CICSTranslatorDDNameSubstitionList}
dds:
- { name: "SYSIN", condition: "!${IS_SQL}", dsn: "${HLQ}.ASM(${MEMBER})", options: "shr", input: true }
- { name: "SYSPRINT", log: "${LOGS}/${STEP}-${FILE_NAME}.asm.log", options: "cyl space(5,5) unit(vio) blksize(400) lrecl(80) recfm(f,b) new ", append: true }
- { name: "SYSPUNCH", dsn: "&&SYSCICS", options: "cyl space(5,5) unit(vio) blksize(400) lrecl(80) recfm(f,b) new ", pass: true }
- { name: "TASKLIB", dsn: "${SDFHLOAD}", options: "shr" }
Compile step
The assembler
mvs step calls ASMA90
to compile the Assembler program.
- step: assembler
type: mvs
pgm: ASMA90
parm: ${assemblerParms}
maxRC: 4
ddnameSubstitution: ${assemblerDDNameSubstitionList}
dds:
- { name: "SYSIN", condition: "!${IS_CICS} && !${IS_SQL}", dsn: "${HLQ}.ASM(${MEMBER})", options: "shr", input: true }
- { name: "ASMAOPT", condition: "${isAsmaOptionsFile}", dsn: "${HLQ}.ASMAOPT(${MEMBER})", options: "shr", input: true }
- { name: "SYSPRINT", log: "${LOGS}/${STEP}-${FILE_NAME}.asm.log", options: "cyl space(5,5) unit(vio) blksize(80) lrecl(80) recfm(f,b) new", append: true }
- { name: "SYSUT1", options: "cyl space(5,5) unit(vio) blksize(80) lrecl(80) recfm(f,b) new" }
- { name: "SYSLIN", dsn: "${HLQ}.OBJ(${MEMBER})", options: "shr", output: true }
- { name: "SYSLIB", dsn: "${HLQ}.MACRO", options: "shr" }
- { dsn: "${SCEEMAC}", condition: { exists: "SCEEMAC" }, options: "shr" }
- { dsn: "${MACLIB}", condition: { exists: "MACLIB" }, options: "shr" }
- { dsn: "${MODGEN}", condition: { exists: "MODGEN" }, options: "shr" }
- { dsn: "${SDFHMAC}", condition: "${IS_CICS}", options: "shr" }
- { dsn: "${SCSQMACS}", condition: "${IS_MQ}", options: "shr" }
- { dsn: "${SDFSMAC}", condition: { exists: "SDFSMAC" }, options: "shr" }
- { name: "SYSADATA", condition: { exists: "errPrefix" }, dsn: "${HLQ}.SYSADATA(${MEMBER})", options: "shr" }
- { name: "SYSADATA", condition: { exists: "debug", notExists: "errPrefix" }, dsn: "${HLQ}.SYSADATA(${MEMBER})", options: "shr" }
- { name: "SYSXMLSD", condition: { exists: "errPrefix" }, dsn: "${HLQ}.${errPrefix}.SYSXMLSD.XML", options: "tracks space(200,40) dsorg(PS) blksize(27998) lrecl(16383) recfm(v,b) new keep" }
Debug side file
The debugSideFile
mvs step calls EQALANGX
to debug the side file when the debug
variable is set.
- step: debugSideFile
condition:
exists: debug
eval: ${debug}
type: mvs
pgm: EQALANGX
parm: ${debugSideFileParms}
maxRC: 8
dds:
- { name: "TASKLIB", dsn: "${PDTCCMOD}", options: "shr" }
- { name: "SYSADATA", dsn: "${HLQ}.SYSADATA(${MEMBER})", options: "shr" }
- { name: "IDILANGX", dsn: "${HLQ}.EQALANGX(${MEMBER})", options: "shr", output: true, deployType: "EQALANGX" }
Link-edit step
The linkEdit
mvs step optionally calls IEWBLINK
to perform link-edit when the doLinkEdit
variable is true
.
- step: linkEdit
type: mvs
pgm: IEWBLINK
parm: ${linkEditParms}
condition: ${doLinkEdit}
maxRC: 0
dds:
- { name: "SYSLMOD", dsn: "${HLQ}.LOAD(${MEMBER})", options: "shr", output: true, deployType: "LOAD", scan: "${scanLoadModule}" }
- { name: "SYSPRINT", log: "${LOGS}/${STEP}-${FILE_NAME}.asm.log", options: "cyl space(5,5) unit(vio) blksize(80) lrecl(80) recfm(f,b) new", append: true }
- { name: "SYSUT1", options: "cyl space(5,5) unit(vio) blksize(80) lrecl(80) recfm(f,b) new" }
- { name: "SYSLIN", dsn: "${HLQ}.OBJ(${MEMBER})", options: "shr", output: true }
- { name: "SYSLIB", dsn: "${HLQ}.OBJ", options: "shr" }
- { dsn: "${SCEELKED}", options: "shr" }
- { dsn: "${SDFHLOAD}", condition: "${IS_CICS}", options: "shr" }
- { dsn: "${SDFSRESL}", condition: "${isIMS}", options: "shr" }
- { dsn: "${SDSNLOAD}", condition: "${IS_SQL}", options: "shr" }
- { dsn: "${SCSQLOAD}", condition: "${IS_MQ}", options: "shr" }
- { dsn: "${CSSLIB}", condition: { exists: "CSSLIB" }, options: "shr" }