To run a background process (cron job) in UNIX, build a script as follows;
export APPXPATH=/appx/appx350/data
export TERM=ibm3151
su - xxx -c "/appx/appx350/appx -s -d=ddd -a=TRN -t=JOB -p=BATCH_CYCLE" 1>/dev/null 2>/dev/null
The first export command is the APPXPATH directory for your APPX installation.
Example: /appx/appx350/data
The second export command defines the terminal type. Example: ibm3151. Even
thought the process is running in the background, the terminal type must be
defined.
The su command line parameters:
xxx is the o/s userid of who is running this process
-c " then the APPX application path
-s tells APPX to automatically pass through any entry screens
like sort and disposition that might be encountered.
-d ddd is the database id of the APPX application
-a application id
-t process type, most likely a JOB
-p the name of your process followed by ". The underscore maintains
the space you may have in the APPX process name.
1> and 2> tells appx to send interactive message to the null device.
These two parameters are to be included in the su line.
Of course you would have one script for each process you wanted to run in
background. |