Commodore
Commodore
338 views

I think ACU cobol has fault functionality! Any one face same issue please?

My client has reported issue on below logic that IMGRETRV.EXE is not launching by Acu cobol program. But, if i click on IMGRETRV.EXE ,then it is launching, but, why ACU cobol program is not launching IMGRETRV.EXE using below logic, please note my client has reported in their few PCs  IMGRETRV.EXE is not starting by acu cobol program!

ACU cobol has fault functionality or my program has fault?

==========

* Build the SYSTEM call command line:
Move spaces to WD-X80.

If LS-USER-TYPE-DEV 
   Move "ETC\IMGRETRV.EXE" to WD-X40 
else
   Move "ETC\IMGRETRV.EXE" to WD-X40
End-If.
String "C:" 
LS-DIR-PCPATH-VALUE 
WD-X40 
delimited by spaces into WD-X80 
End-String. 
If LS-DIR-PCDRIVE-VALUE > spaces
Move LS-DIR-PCDRIVE-VALUE to WD-X80 (1:1)
End-If.
* Check for executable: V.10.02
Call "C$FILEINFO" 
using WD-X80 
WFile-Info 
giving WExit-Status 
End-Call. 
If WExit-Status = zero AND WFile-Size > zero 

    Next Sentence 
else
   Move 9031 to IMGEVIEW-RETURN-CODE 
Go to XImage-Call 
End-If. 
* Call SYSTEM:
Call "C$RUN"
using WD-X80
on exception
Move 9991 to IMGEVIEW-RETURN-CODE
End-Call.
XImage-Call.

0 Likes
2 Replies
Micro Focus Expert
Micro Focus Expert

There is a lot going on in this post.  Clicking on IMGRETRV.EXE typically means your environment has all of the executables needed to run that particular software. If  you use a command prompt and cd to C:\etc, then type in IMGRETRV.EXE and enter, does that application run?

There may be some environment variables (or dlls that reside in the PATH env variable) that IMGRETRV.EXE relies upon to execute. If  IMGRETRV.EXE runs from the C:\etc directory, try using C$SYSTEM instead of C$RUN in your COBOL program.

0 Likes
Commodore
Commodore

Okay, let me try this

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.