Running Acucobol in HP-UX's cron


I am running ACUCOBOL in HP-UX. When I logged in as developer and runs COBOL, it does not issue any problem. How ever I encounter problems when ;

1) I logged in as root. Initialize the same environment as being initialized by developer and I encounter this error:

FILE PAY01PRN;DEV=LP1;CCTL                      ^  Unknown device class. (CIERR 344)

Pid 22770: *** NLGETFNAME2: bad FileEquation FILE PAY01PRN;DEV=LP1;CCTL Err:344 Parm:-21 ***

FILE PAY01OK;DEV=LP1;CCTL                     ^  Unknown device class. (CIERR 344)

Pid 22770: *** NLGETFNAME2: bad FileEquation FILE PAY01OK;DEV=LP1;CCTL Err:344 Parm:-20 ***

2) If I were to run the job in cron. It does not execute the COBOL program. The syntax to run the cobol program is :

/opt/acucobol/bin/runcbl_AMXW805 -c /opt/amx804/NEWLAB/ACUCOB/config.ini -le acuerror.log -x /smbm/test/PAYMENT/PROG/PAY01.acu < TEMPFILE1


I appreciate any help regarding the issues. Thanks

  • For question #1, you're issuing an MPE "FILE" equation.  Is this being done in a command file, or from within COBOL using an HPCICOMMAND intrinsic?  Either way, this isn't really a COBOL issue - it's a function of your MPE emulation environment, which appears to be AMXW.  Have you asked your AMXW vendor (Fresche/Speedware) about this?

    For question #2, what error messages, if any, are you getting?  Is anything written to the acuerror.log file?  When something works as a regular user but fails as root, it's often due to environment variables not being set correctly.  When running from a cron job, you can put your command into a shell script that also sets (and exports) the correct environment variables.  I would pay special attention to your SHLIB_PATH variable, making sure it includes the paths to both the ACUCOBOL and AMXW libraries.