Highlighted
Absent Member.
Absent Member.
4367 views

call x'91' function 35

Jump to solution

We just recently went to visual cobol and we are having trouble with the call x'91' function 35.  It seems to work fine on each of the developers pc's - which have visual cobol installed on them, but not on our end user's pc's which don't have visual cobol installed. 

Tags (1)
0 Likes
1 Solution

Accepted Solutions
Highlighted
Absent Member.
Absent Member.

We figured out that this was an internal issue.  Thanks

View solution in original post

0 Likes
8 Replies
Highlighted
Absent Member.
Absent Member.

Sorry forgot to provide this.  Here is the code

      01 command-lin-string  pic x(80) value spaces.

      01 result              pic x comp-x.

      01 func                pic x comp-x value 35.

      01 command-lin.

         03  command-lin-length  pic x comp-x value zero.

             MOVE SPACES               TO COMMAND-LIN-STRING

             STRING

               "PRINT /D:"             DELIMITED BY SIZE,

               PRINTER-NAME2           DELIMITED BY " ",

               " C:\TEMP\PRINT.FIL"    DELIMITED BY SIZE

             INTO COMMAND-LIN-STRING

             display command-lin-string upon command-line

             call x"91" using result, func, command-lin.

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Hello BHunt:

If the end user's PCs don't have Visual COBOL installed, then what *do* they have?

In order to run programs compiled with Visual COBOL, an end-user PC should have the Micro Focus runtime product corresponding to the version of Visual COBOL.  For example if the programs were compiled using Visual COBOL version 2.2, then end-user PCs should have the product named COBOL Server version 2.2.

If the end-user PCs have an older version of Micro Focus, it could cause "undefined behavior" including possibly the symptoms you describe.

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Does the actual print command that you are trying to execute run OK from a command prompt outside of the program?

Look at the value of the printer-name2 variable when executing the program and replace the variable below with the actual value:

Open up a command prompt and type the command:

PRINT /D:PRINTER-NAME2 C:\TEMP\PRINT.FIL

does this work?

0 Likes
Highlighted
Absent Member.
Absent Member.

We figured out that this was an internal issue.  Thanks

View solution in original post

0 Likes
Highlighted
Absent Member.
Absent Member.

Having similar issue. I can run the command using my credentials, but another user receives a pop-up box stating "The specified network name is no longer available".

0 Likes
Highlighted
Absent Member.
Absent Member.

For us it was an internal issue.  We pushed an environment variable update that was required for visual cobol to our users computers and it didn't work correctly.  Once we updated the environment variables we were good to go.

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Hi evancraig,

To be clear you get the network name error when running the command from the command line and not just from within a COBOL program, correct?

What is the command you are attempting to run?

The error can be caused by users not having correct permissions to network shares that you are trying to access or to mapped drive letters that may no longer be valid, etc.

When I google the error I also see references to older versions of anti-virus software such as Kaspersky and Symantec causing these type of problems.

Thanks.

0 Likes
Highlighted
Absent Member.
Absent Member.

That is correct. This is the command trying to run f:\programs\sys1\t102a\electpost And I am able to run command, but another user is not.

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.