This Appendix contains the two catalogued procedures discussed in Chapter 2 which are needed to compile and link edit a HAL/S program. The two procedures perform varying degrees of processing. The procedure names and their functions are:
The following comments describe each of the processes involved in detail. Line references are to the most complex procedure, HALFCL; the other procedure simply consists of the first job step invoked in HALFCL.
Step One (HAL): Compilation
HALFC - Compiles a HAL/S program
HALFCL - Compiles and links a HAL/S program
Line 1000 - This PROC statement names the procedure and defines the symbolic parameters. The OPTION parameter is the means of supplying optional information to the compiler.
Lines 20000-30000 - The name of the compilation step is HAL. The name of the actual program to be executed is MONITOR. MONITOR handles all compiler/OS interfaces and also performs the actual loading and overlaying of the three phases of the compiler. The compiler requires a 350K region, although a larger region may be specified. The compiler will always use all the memory it is given. A larger region will generally result in smaller compilation times. A default time limit of 1 minute is supplied. This is sufficient for most average size HAL/S programs (approximately 300 HAL/S statements). The PARM field contains the compile-time options. The OPTION field receives any user-specified options.
Line 40000 - The STEPLIB DD card specifies the location of the load module library containing the module MONITOR needed to run the compiler. This card may define any direct access library which contains the proper module or may be deleted at installations where the module has been made part of the system library (SYS1.LINKLIB).
Line 50000 - The PROGRAM DD card defines the compiler phases that are to be used. This dataset has a DCB of the form:
DCB= (RECFM=F, LRECL=7200, BLKSIZE=7200)
and may reside on direct access or magnetic type. It is recommended, however, that direct access be used.
HAL/S-FC User’s Manual USA003090 32.0/17.0
A -2 November 2005
Line 60000 - The SYSPRINT DD card defines the primary listing dataset. This is generally assigned to a system output class, but may be associated with any sequential dataset with the proper characteristics. The user may supply DCB attributes; the record format must be FBA with a logical record length of 133 and any appropriate block size.
Line 70000 - The LISTING2 DD card defines the secondary listing dataset controlled by the LISTING2 compiler option. It may define a system output class or any sequential dataset. The DCB requirements are the same as for SYSPRINT.
Lines 80000-100000 - The OUTPUT3 DD card defines the dataset which is to receive object code which is produced by the compiler. In the prototype procedure, this dataset is given a temporary name (&&HALOBJ) and is passed (DISP=(MOD,PASS)) to subsequent steps. Since this dataset contains card images, it must have a logical record length of 80 and a record format of F or FB. The blocking factor may be any legal multiple of 80. This DD card may specify a direct access, magnetic tape, or unit record device.
Line 110000 - The OUTPUT4 DD card defines the location to which a duplicate of the OUTPUT4 file will be sent under control of the DECK compiler option. Its DCB characteristics are identical to OUTPUT3.
Lines 120000-130000 - The OUTPUT5 DD card defines the dataset which will receive the Simulation Data File (SDF).
The OUTPUT5 DD card must define a partitioned dataset. The SPACE parameters used in the prototype procedure are more than adequate to contain the mapping file of any one HAL/S program.
One member of the partitioned dataset is created for a compilation unit. The name of the member is the characteristic name of the unit being compiled, padded with blanks if necessary and preceded by the characters ##. If a member with the desired name does not exist at compile-time, one is created. If a member with the desired name already exists, it is replaced by the new member. The use of a permanent partitioned dataset makes it possible to maintain a “library” of SDFs, with the member names uniquely specifying the HAL/S compilations to which they correspond (see Section 3.5 ).
Lines 140000-150000 - The OUTPUT6 DD card defines the partitioned dataset onto which templates for compilation units may be placed. Refer to Section 3.4 for details on template generation. The DCB attributes for the statement should be compatible with those used for primary compiler input (SYSIN) and secondary compiler input (INCLUDE).
Line 160000 - The OUTPUT7 DD card specified as “Dummy” is included to cover an option which is not used for normal compilations.
Line 170000 - The ERROR DD card defines the partitioned dataset which contains the error message texts used by the compiler. This dataset is supplied with the compiler and, being a partitioned dataset, must reside on a direct access volume. Lines 180000-230000 - The FILE1 through FILE6 DD cards specify work files.
These files are used for interphase communication. The device may be either direct access or magnetic tape. Space equivalent to approximately 60 tracks on a 2314 should be available for each DD card. The DCB is internally specified and should not be altered by JCL.
Step Two (LKED): Link Editing
Lines 240000-340000 - These lines define the link edit step, processing the object module output of the HAL/S compilation and producing a load module for the flight computer.
010000 //HALFC PROC OPTION=,LEVEL=HALS101
020000 //HAL EXEC PGM=MONITOR,REGION=350K,TIME=1, 030000 // PARM=‘NOZCON,&OPTION’ 040000 //STEPLIB DD DISP=SHR,DSN=&LEVEL..MONITOR 050000 //PROGRAM DD DISP=SHR,DSN=&LEVEL..COMPILER 060000 //SYSPRINT DD SYSOUT=A,DCB=(RECFM=FBA,LRECL=133,BLKSIZE=3458) 070000 //LISTING2 DD SYSOUT=A,DCB=(RECFM=FBA,LRECL=133,BLKSIZE=3458) 080000 //OUTPUT3 DD UNIT=SYSDA,DISP=(MOD,PASS),SPACE=(CYL,(1,1)), 090000 // DCB=(RECFM=FB,LRECL=80,BLKSIZE=400), 100000 // DSN=&&HALOBJ 110000 //OUTPUT4 DD SYSOUT=B,DCB=(RECFM=FB,LRECL=80,BLKSIZE=400,FUNC=I) 120000 //OUTPUT5 DD DISP=(MOD,PASS),DSN=&&HALSDF,SPACE=(TRK,(2,2,1)), 130000 // DCB=(RECFM=F,LRECL=1680,BLKSIZE=1680),UNIT=SYSDA 140000 //OUTPUT6 DD DISP=(MOD,PASS),DSN=&&TEMPLIB,SPACE=(TRK,(2,2,1)), 150000 // DCB=(RECFM=FB,LRECL=80,BLKSIZE=1680),UNIT=SYSDA 160000 //OUTPUT7 DD DUMMY,DCB=(RECFM=FM,LRECL=121,BLKSIZE=121) 170000 //ERROR DD DISP=SHR,DSN=&LEVEL..ERRORLIB
HAL/S-FC User’s Manual USA003090 32.0/17.0
A -4 November 2005
Figure A-1 HALFC
190000 //FILE2 DD UNIT=SYSDA,SPACE=(CYL,3) 200000 //FILE3 DD UNIT=SYSDA,SPACE=(CYL,3) 210000 //FILE4 DD UNIT=SYSDA,SPACE=(CYL,3) 220000 //FILE5 DD UNIT=SYSDA,SPACE=(CYL,3) 230000 //FILE6 DD UNIT=SYSDA,SPACE=(CYL,3)
Figure A-2 HALFCL
010000 //HALFCL PROC OPTION=,LEVEL=HALS101
020000 //HAL EXEC PGM=MONITOR,REGION=350K,TIME=1, 030000 // PARM=‘NOZCON,&OPTION’ 040000 //STEPLIB DD DISP=SHR,DSN=&LEVEL..MONITOR 050000 //PROGRAM DD DISP=SHR,DSN=&LEVEL..COMPILER 060000 //SYSPRINT DD SYSOUT=A,DCB=(RECFM=FBA,LRECL=133,BLKSIZE=3458) 070000 //LISTING2 DD SYSOUT=A,DCB=(RECFM=FBA,LRECL=133,BLKSIZE=3458) 080000 //OUTPUT3 DD UNIT=SYSDA,DISP=(MOD,PASS),SPACE=(CYL,(1,1)), 090000 // DCB=(RECFM=FB,LRECL=80,BLKSIZE=400), 100000 // DSN=&&HALOBJ 110000 //OUTPUT4 DD SYSOUT=B,DCB=(RECFM=FB,LRECL=80,BLKSIZE=400,FUNC=I) 120000 //OUTPUT5 DD DISP=(MOD,PASS),DSN=&&HALSDF,SPACE=(TRK,(2,2,1)), 130000 // DCB=(RECFM=F,LRECL=1680,BLKSIZE=1680),UNIT=SYSDA 140000 //OUTPUT6 DD DISP=(MOD,PASS),DSN=&&TEMPLIB,SPACE=(TRK,(2,2,1)), 150000 // DCB=(RECFM=FB,LRECL=80,BLKSIZE=1680),UNIT=SYSDA 160000 //OUTPUT7 DD DUMMY,DCB=(RECFM=FM,LRECL=121,BLKSIZE=121) 170000 //ERROR DD DISP=SHR,DSN=&LEVEL..ERRORLIB 180000 //FILE1 DD UNIT=SYSDA,SPACE=(CYL,3) 190000 //FILE2 DD UNIT=SYSDA,SPACE-(CYL,3) 200000 //FILE3 DD UNIT=SYSDA,SPACE=(CYL,3) 210000 //FILE4 DD UNIT=SYSDA,SPACE=(CYL,3) 220000 //FILE5 DD UNIT=SYSDA,SPACE=(CYL,3) 230000 //FILE6 DD UNIT=SYSDA,SPACE=(CYL,3) 240000 //LKED EXEC PGM=LNK101,TIME=1,PARM=(LIST,MAP,NOXREF,NOAUTO,NOTABLE) , 250000 // COND=(0,LT,HAL) 260000 //STEPLIB DD DISP=SHR,DSN=&LEVEL..SUPPORT 270000 //SYSPRINT DD SYSOUT=A,DCB=BLKSIZE=121 280000 //SYSLIB DD DISP=SHR,DSN=&LEVEL..RUNLIB 285000 // DD DISP=SHR,DSN=&LEVEL..ZCONLIB 290000 //SYSLIN DD DISP=SHR,DSN=&LEVEL..NUCLEUS 300000 // DD DISP=(OLD,DELETE),DSN=&&HALOBJ 310000 // DD DDNAME=SYSIN 320000 //SYSLMOD DD DSN=&&LOADMOD(GO),DISP=(,PASS),UNIT=SYSDA, 330000 // SPACE=(CYL,(1,1,1)) 340000 //SYSUT1 DD SPACE=(CYL,(1,1)),UNIT=(SYSDA,SEP=(SYSLIN,SYSLMOD))
HAL/S-FC User’s Manual USA003090 32.0/17.0
A -6 November 2005