Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
wsam78 Absent Member.
Absent Member.
853 views

Running Acucobol in HP-UX's cron

Hello,

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

0 Likes
1 Reply
Chuck Edgin Absent Member.
Absent Member.

RE: Running Acucobol in HP-UX's cron

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.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.