![]() |
20 Startup
The CFS Startup mechanism offers the user the possibility of executing a sequence of commands automatically after starting the program. The commands or selection records to be processed will be read from a SAM file (Startup file). Commands that could be executed from a Startup file include user-specific program modes. The syntax used in Startup files has been fully described in the last chapter, "Procedure Language".
Startup File Hierarchy
1) After being called, CFS will first look for a file with the link name of CFSCMD or CFSCMD1. If the user has assigned a file with this link name, then it will be used as the Startup file.
A file assigned with the CFSCMD link name may only be processed in dialog mode. A file with the link name CFSCMD1 may additionally be used when calling CFS from procedures, or in Enter mode (SETSW ON=1). Exception: SETSW ON=11.
2) If no TFT entry with the link name CFSCMD exists, then the Job name of the LOGON command (/.name LOGON ...) will be tried together with the prefix 'CFS.STARTUP'. If a file named CFS.STARTUP.name exists under that same userid exists, then it wll be used as the Startup file.
If no CFS.STARTUP.name file exists under the users own userid, then CFS will look for a central file with this name in the userid under which CFS is stored (normally $CFS, or $TSOS).
3) If none of the above files exist, CFS will look for a file called CFS.STARTUP.STD under the users own userid.
If the file CFS.STARTUP.STD does not exist under the users own userid, then CFS will make a final attempt to locate a central file with this name in the userid under which CFS is located (normally $CFS, or $TSOS).
The Startup file is a CFS procedure which will be executed automatically when CFS is started. For the procedure-specific language elements that are applicable to Startup files, see Chapter 19 "Procedure Language".
Note:
If a Startup file conforming to one of the above naming conventions exists, but the user does not want it used as a Startup file for the current CFS run, then a /FILE *DUMMY,LINK=CFSCMD command should be issued before loading CFS.