HP 3000 Manuals

Subprogram Notes [ HP Micro Focus COBOL/iX Implementation Notes ] MPE/iX 5.0 Documentation


HP Micro Focus COBOL/iX Implementation Notes

Subprogram Notes 

   *   Use a COMP-5 item to ensure that the byte order is correct when
       you are porting a program to another language and you are passing
       numeric parameters that are stored in binary.

   *   The cursor must be explicitly positioned for screen output that
       uses called C routines and the ADIS ACCEPT/DISPLAY module.
       Position the cursor before executing the cobprintf() routine or
       DISPLAY statement.  In C use the cobmove() routine and in HP Micro
       Focus COBOL/iX use the DISPLAY...AT statement.

   *   Modules that are held in archive libraries are only linked into
       your statically linked executable if they are referenced by using
       the "CALL LITERAL-1" form of the CALL statement.  When you use the
       "CALL IDENTIFIER-1" statement, the name you are calling is not
       known until you run the program.  To link modules that are called
       by the CALL IDENTIFIER-1 rather than CALL LITERAL-1, follow the
       steps listed below:
          1.  Create a dummy C source file containing calls to the
              modules specified in the CALL IDENTIFIER-1 statements in
              your program.

                   foo(){
                     rtn1();
                     rtn2();
                     ...
                     ...
                     rtnn();
                   }
          2.  Link this dummy file with the remaining modules.

                   cob -x -llib prog.cbl dummy.c

   *   Items passed BY VALUE are extended to 4 bytes.  Signed items are
       sign extended and unsigned items are zero extended.  This is to
       ensure that the items are compatible with how C expects BY VALUE
       parameters to be passed.



MPE/iX 5.0 Documentation