Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Microfocus Call by Number Routines

Status
Not open for further replies.

RPierce

Programmer
Jul 21, 2003
3
US
I have an old Microfocus COBOL program I am making some modifications to and it uses some CALL BY NUMBER routines. I have found what most of them do except for one. It is 'CALL X"91"' Using function 2 and function 35. I can not seem to find what these two functions do. I have found answers for several other functions (18, 46, 47). Does anyone know what these two fuctions do or any ideas on where to look.
 
91-35 starts a DOS shell to enter a system command.
The following code fragment is an example of getting a DOS directory listing. You can of course use any DOS command.

As far as I know there is no 91-2 at least in 32 bit COBOL. If there ever was it is probably obsolete.

01 CALL9135-PARAMETERS.
05 CALL9135-CALL-FUNCTION PIC X(01) VALUE 35 COMP-X.
05 CALL9135-RETURN-CODE PIC X(01) VALUE 0 COMP-X.
05 CALL9135-COMMAND-LENGTH PIC X(01) VALUE 0 COMP-X.
05 WORK-COMMAND-LINE PIC X(80).


PROCEDURE DIVISION

MOVE "DIR" TO WORK-COMMAND-LINE.
DISPLAY WORK-COMMAND-LINE UPON COMMAND-LINE.

CALL x'91' USING CALL9135-RETURN-CODE
CALL9135-CALL-FUNCTION
CALL9135-COMMAND-LENGTH.

GOBACK.

Clive
 
I have a 1993 Microfocus COBOL manual and it does not define a function 2 for routine x'91'. If there ever was a funtion 2, it must be realy old.
 
Thank you for information on the function call. I am not sure yet what the section of code is trying to do. The DATE WRITTEN has a date of 12/03/86 and I don't think the program has been touched since then.

Here is the code for the call statement, Working storage and procedure division. If anyone else has any ideas or thoughts I would be glad to hear from you.

Code:
01  E-DOS-CALL-DATA.
    03 E-RESULT                 PIC 9(02) COMP   VALUE ZERO.
    03 E-FUNCTION               PIC 9(02) COMP   VALUE ZERO.
    03 E-COMMAND-BUFFER.
       05 E-COMM-LGTH           PIC 9(02) COMP   VALUE 80.
       05 E-COMM-VAL            PIC X(80) VALUE SPACES.
       05 E-COMM-VALUE          PIC X OCCURS 80 TIMES
REDEFINES E-COMM-VAL.

01 E-STATUS                     PIC X(01) VALUE SPACES.


     MOVE A-NEXT-PROGRAM         TO E-COMM-VAL.
     PERFORM MEN-CALC-COMM-LGTH  THRU MEN-CALC-COMM-LGTH-X.
     MOVE 2                      TO E-FUNCTION.
     CALL X"91"                  USING
        E-RESULT,
        E-FUNCTION,
        E-COMMAND-BUFFER.

     IF  E-RESULT                NOT = ZERO
         MOVE "1"                TO E-STATUS
         GO TO MEN-CALL-BATCH-FILE-X.

RPierce
 
I have some really old Micofocus manuals in storage. I will see if I can pull them out and find something on function 2.
 
I would appreciate the effort in looking this up in some old manuals. Thank you for the offer and help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top