SYCP - XXXXXXXX
Automatic Process Control
The SYCP common code is used to identify information relating to a mask that is to be run using a job scheduling process (primarily cron on UNIX machines).
The primary functions of the control program (sy150) are to create the USERID and RUNREQ files, and to execute JCL (which contains the interface program). Since this program can be used by many different processes; RUNREQ, JCL, and possibly USERID files will have to be created specific to the process being run. To accomplish this; this common code will contain the location of a RUNREQ file to use, a USERID in which to build a USERID file, and the menu mask indicating which JCL to execute. The common code will always have a code category of SYCP. The code value will be user-defined and will be sent to the control program via an information parameter (MPE_INFO).
Special Notes: Scheduling a process
To create the cron job, a deferred batch job must first be created. Do this by temporarily adding a menu option SY CP to run program SY150, prompting for whatever questions need to be asked. Run this new process as a deferred batch job. The menu option can then be removed, as this program will never need to be run from the BusinessPlus menu.
Go to the .spool directory where the J## and J##I files exist and copy them to new names in the / ifas / admin / perm directory or some other protected directory. (E.g., call them GLUTRI.job and GLUTRII.job). Edit the first job file (GLUTRI.job in this example) by addexports of BSI_HOME, XPORTDIR, COBDIR, INFORMIXDIR, and MPE_INFO, according to the approvalues.
For example:
export BSI_HOME= / ifas / bsi
export XPORTDIR= / ifas / xport
export COBDIR= / usr / opt / cobol
export INFORMIXDIR= / dbms / informix
export MPE_INFO=xxxxxxxx (the mask you used in associated code 1)
Also modify the line where it points to the original .spool / J##I file to point to the new job file. ( / ifas / admin / perm / GLUTRII.job in this example)
Now create a new file (call it something like ifas.cron) in the / ifas / admin / perm directory (or whatever directory you copied the J files to) with just a single line, as follows; where xxxxxxxx is the mask you used in associated code 1:
00 06 * * 1,2,3,4,5 / ifas / admin / perm / xxxxxxxx.job
Additional entries can be added to spawn other interface jobs as well by appending commands with a semicolon, or appending an entire new schedule and commands with a comma.
The format of the command line is "mm hh DD MM d command":
mmMinute of the hour to run the job (0-59)
hhHour of the day to run the job (0-23)
DDDay of the month to run the job (1-31); * means no specific day
MMMonth of the year to run the job (1-12); * means no specific month
dList of days of the week to run the job, separated by commas (0-6 with 0 = Sunday)
An asterisk in any field represents always.
Once the new ifas.cron file is created, kick it in motion with the following command: crontab ifas.cron
To cancel the scheduled jobs, type: crontab -r
To list the current scheduled jobs, type: crontab -l
Code Category: SYCP
Code Value: xxxxxxxx
Short Description: Leave blank to enable; enter "OFF" to disable
Medium Description: Used to describe the process being run
Long Description: Location of the RUNREQ file to be used in FILEformat. E.g., RUN.
Associated Numeric Values
1: Optional debug level 1-9
2-5: Reserved for future use.
Associated Codes
1: BusinessPlus mask to execute. E.g., GLUTRIIJ (required).
2: BusinessPlus Nucleus User Id to use when executing the automatic process (required).
3: Printer definition to use in xxyyyyyyyyzz; where xx is the number of copies, yyyyyyyy is the NULP printer code, and zz is the prior. E.g., 01LP 08 (optional).
4: 2nd BusinessPlus mask to execute. E.g., GLJEDS (optional)
5: 3rd BusinessPlus mask to execute (optional).
Associated Descriptions
1-5: Reserved for future use.