call x'91' function 35

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:

  • 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.

  • 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.

  • 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?

  • Verified Answer

    We figured out that this was an internal issue.  Thanks

  • 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".

  • 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.

  • 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.

  • 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.