Highlighted
Contributor.
Contributor.
92 views

SYSTEM call in 10.3.0

We are attempting a migration from HP-UX acucobol version 6.2.0.1 to RHEL Acucobol version 10.3.0.

We attempt to run the command:

dtconnect.pl prod X78B063 jsc.req jsc.rsp

Using:

CALL "C$SYSTEM" USING SYSTEM-COMMAND GIVING ERR-RETURN.

It returns 255. If I invoke the shell in the debugger, the above command works and returns zero. This is an evaluation copy if that matters.

Any ideas?

Thanks!!!

__John

0 Likes
3 Replies
Highlighted
Micro Focus Frequent Contributor
Micro Focus Frequent Contributor

Re: SYSTEM call in 10.3.0

In order to determine what is causing this failure, it would be useful to try and narrow down the scope of the problem.

For example, can you execute any commands using C$SYSTEM, or, does only attempting to execute this specific Perl script fail?

Do you know if the Perl script is executing, and if so, do you have any way to determine if it is failing?

Also, have you tried reproducing this issue in a small test program?  It might be helpful to create a small test program that you can use to more easily diagnose this concern.

Once we get a better understanding of whether C$SYSTEM is working in this environment, or, if only particular Perl scripts are affected, then, we can determine what steps can be taken to further investigate this matter.

0 Likes
Highlighted
Contributor.
Contributor.

Re: SYSTEM call in 10.3.0

Thanks for the fast reply. I made some simple test programs. If it calls a shell script it is fine. This is a Perl problem. 

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: SYSTEM call in 10.3.0

Good morning,  @JohnCampbell .

Have you tried adding FLAGS to your C$SYSTEM call?
These may help in order to improve the way the call is executed.

For example:

INITIALIZE ws-flags
ADD CSYS-SHELL TO ws-flags
CALL "C$SYSTEM" USING SYSTEM-COMMAND, ws-flags GIVING ERR-RETURN.

Please find all the information about FLAGS in the C$SYSTEM Documentation.

Looking forward for your feedback.

----------------------------
Claudio Contardi
Product Support Engineer, Senior
Micro Focus
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.