.ENABLE SUBSTITUTION
;
;	      C C L G E N . C M D
;
; This command file will create a tailored CCL for your environment
; depending on the answers to your questions.  CCL requires parent/offspring
; support, the SPAWN directive and EXIT WITH STATUS.
;
.ASK ASM Assemble CCL
.SETS LIST ""
.SETS MAPFIL ""
.SETS DCLFIL ""
.SETS TBLFIL ""
.SETF MP
.SETF KMSTBL
.SETF DFLTBL
.SETF LST
.SETF PIP
.SETF CREATE
.SETF HELP
.IFF ASM .GOTO TKB
.IFT ASM .ASK LST Produce an assembly listing file (not spooled)
;
; You may select 1 of 2 parameter parsing options as the default; one
;  that is virtually identical to the previous release of CCL (V8.0),
;  or the new extended parsing supported by this version of CCL (V9.0)
;
.ASK NEWPRS Default to the new (V9.0) parameter parsing 
;
; CCL normally looks for the group and system wide CCL command
;  files on LB1: (globally assigned)
;
.ASK LB0 Do you wish CCL to look for these files on LB0:
;
; Internal command lookup for DCL-like commands can be supported by:
;     1) including the DCL.MAC module''s code section
;        and/or,
;     2) including an internal CCL command file (table)
;
.ASK DCL Do you wish to include DCL.MAC''s code in CCL (option 1)
.IFT DCL;
.IFT DCL; DCL code is subdivided into 2 subsections: 1) the PIP-like commands, and
.IFT DCL; 2) various other functions (SHQ, ATS, etc.). The latter commands are
.IFT DCL; being included by default.
.IFT DCL;
.IFT DCL .ASK PIP Include DCL code to support PIP-like commands
;
.ASK TBL Do you wish to include command lookup from an internal CCL table
.IFT TBL ;
.IFT TBL ; Two options are provided for supporting command lookup from
.IFT TBL ;  an internal file/table:
.IFT TBL ;     1) User supplied table (TABLE.MAC)
.IFT TBL ;     2) Standard table (TABLE.KMS) supporting DCL PIP-like commands
.IFT TBL ;
.IFT TBL .ASK DFLTBL Are you supplying the internal table (option 1)
.IFT DFLTBL .ASK CREATE Do you need to create the internal table
.IFT CREATE ;
.IFT CREATE ; To create an internal table we will chain to TABLEGEN.CMD.
.IFT CREATE ; When it exits, you will have a TABLE.MAC file.
.IFT CREATE ;
.IFT CREATE @TABLEGEN
;
.IFF DFLTBL ; TABLE.KMS will be used for internal PIP-like commands
.IFT DFLTBL ; TABLE.MAC will be used for the internal CCL table
.IFT DFLTBL ;   You are responsible for creating this file!!
.IFT TBL ;
;
; CCL may be configured to automatically issue a "HELP" command if the
;  original command line ends in a "?".  In the event that the "?" terminator
;  has other significance for your installation, this feature may be disabled.
;
.ASK HELP Should CCL issue a HELP command if the command line ends with "?" 
;
;*****
;
; You must now select the order that the CCL command files are going
;  to be opened.  Enter the # corresponding with the following files
;  in the order that they should be opened :
.IFT TBL ;	1 = internal file/table
;	2 = SY0:[ggg,mmm]USERCCL.CCL
.IFF LB0 ;	3 = LB1:[ggg,5]GRPCCL.CCL
.IFF LB0 ;	4 = LB1:[1,5]SYSCCL.CCL
.IFT LB0 ;	3 = LB0:[ggg,5]GRPCCL.CCL
.IFT LB0 ;	4 = LB0:[1,5]SYSCCL.CCL
;
.ASKN [0.:4.] FILE1 Enter # of file/table to open first
.ASKN [0.:4.] FILE2 Enter # of file/table to open second
.ASKN [0.:4.] FILE3 Enter # of file/table to open third
.ASKN [0.:4.] FILE4 Enter # of file/table to open fourth
;
.OPEN PRECCLASM.MAC;1
.ENABLE DATA
;
;	DEFINE CONDITIONAL ASSEMBLY VARIABLES
;
.DISABLE DATA
.IFT NEWPRS .DATA DEFPRS=1	; Default to V9.0 parsing
.IFF NEWPRS .DATA DEFPRS=0	; Default to V8.0 parsing
.IFF LB0 .DATA ; $LB0=0		; Look on LB1: for SYSCCL.CCL
.IFT LB0 .DATA $LB0=0		; Look on LB0: for SYSCCL.CCL
.IFT DCL .DATA $DCL=0		; Include internal DCL support
.IFT DCL .IFT PIP .DATA $PIP=0		; Include PIP subsection of DCL cmds
.IFT DCL .IFF PIP .DATA ;$PIP=0		; Exclude PIP subsection of DCL cmds
.IFF DCL .DATA ; $DCL=0		; Do not include internal DCL support
.IFT DCL .IFF KMSTBL .DATA $DCLX=0	; Include SHQ, ATS, etc cmds in DCL
.IFT KMSTBL .DATA ; $DCLX=0		; Exclude SHQ, ATS, etc cmds
.IFT HELP .DATA HELP=0		; Issue HELP commands for lines ending in "?"
.IFF HELP .DATA ;HELP=0		; Suppress HELP commands for lines ending in "?"
.IF FILE1 GT 0. .DATA FILE1='FILE1'	; Select 1st file to open
.IF FILE2 GT 0. .DATA FILE2='FILE2'	; Select 2nd file to open
.IF FILE3 GT 0. .DATA FILE3='FILE3'	; Select 3rd file to open
.IF FILE4 GT 0. .DATA FILE4='FILE4'	; Select 4th file to open
.CLOSE
.OPEN CCLASM.ASM;1
.IFT LST .SETS LIST ",CCL.LST;1/-SP"
.DATA CCL.OBJ;1'LIST'=PRECCLASM/PA:1,CCL
.IFT DCL .IFT LST .SETS LIST ",DCL.LST;1/-SP"
.IFT DCL .DATA DCL.OBJ;1'LIST'=PRECCLASM/PA:1,DCL
.IFT LST .SETS LIST ",SPAWN.LST;1/-SP"
.DATA SPAWN.OBJ;1'LIST'=SPAWN
.IFT LST .SETS LIST ",FIXUP.LST;1/-SP"
.DATA FIXUP.OBJ;1'LIST'=PRECCLASM/PA:1,FIXUP
.IFT LST .SETS LIST ",LOOKUP.LST;1/-SP"
.DATA LOOKUP.OBJ;1'LIST'=LOOKUP
.IFT LST .SETS LIST ",PARSE.LST;1/-SP"
.DATA PARSE.OBJ;1'LIST'=PRECCLASM/PA:1,PARSE
.IFT LST .SETS LIST ",WAITCK.LST;1/-SP"
.DATA WAITCK.OBJ;1'LIST'=WAITCK
.IFT LST .SETS LIST ",TABLE.LST;1/-SP"
.IFT TBL .IFT DFLTBL .DATA TABLE.OBJ;1'LIST'=TABLE
.IFT TBL .IFF DFLTBL .DATA TABLE.OBJ;1'LIST'=TABLE.KMS
.CLOSE
MAC @CCLASM.ASM
;PIP CCLASM.ASM;1/DE
.TKB:
.ASK BLD Build CCL
.IFF BLD .GOTO ENDUP
.ASK MP Produce a taskbuild map (not spooled)
.ASK FCSRES Build CCL linked with a FCS resident library
.IFNDF DCL .ASK DCL Do you wish to include the DCL module''s code in CCL
.IFNDF TBL .ASK TBL Do you wish CCL to include command lookup from an internal CCL table
.IFT TBL .IFNDF CCLRES .ASK CCLRES Build the internal CCL table as a resident library
.IFT TBL .IFF CCLRES .GOTO TKB2
;
;  Be sure to install CCLRES.TSK into a common partition prior to
;  installing CCL.TSK....
;
.OPEN CCLRESBLD.BLD;1
.ENABLE DATA
CCLRES.TSK;1/CO/PI,CCLRES.MAP;1/-SP,CCLRES.STB;1=TABLE
/
STACK=0
//
.DISABLE DATA
.CLOSE
TKB @CCLRESBLD.BLD
;PIP CCLRESBLD.BLD;*/DE/NM
.TKB2:
.IFT MP .SETS MAPFIL ",CCL.MAP/-SP"
.IFT DCL .SETS DCLFIL ",DCL"
.IFT TBL .IFF CCLRES .SETS TBLFIL ",TABLE"
.OPEN CCLBLD.BLD;1
.DATA CCL.TSK;1/CP'MAPFIL'=CCL,FIXUP,LOOKUP,PARSE,WAITCK,
.DATA SPAWN'TBLFIL''DCLFIL'
.DATA /
.IFT FCSRES .DATA LIBR=FCSRES:RO
.IFT TBL .IFT CCLRES .DATA RESCOM=CCLRES/RO
.ENABLE DATA
EXTTSK=255		;RESERVE SPACE FOR "P" WORKSPACE
GBLDEF=CLIFIL:44514	;CLI''S CHANGE FILES FROM XXXCCL.CCL TO XXXCLI.CCL
TASK=...CA.
PRI=90
UNITS=2
ASG=TI:2,LB:1
STACK=64
//
.DISABLE DATA
.CLOSE
TKB @CCLBLD.BLD;1
;PIP CCLBLD.BLD;1/DE
.ENDUP:; CCLGEN complete
