Microsoft KB Archive/31220

PROGRAM-ID and CALL Are Case Sensitive

PSS ID Number: Q31220 Article last modified on 04-21-1993

2.20 MS-DOS

Summary: When CALLing a COBOL subprogram (under both RUNCOB and VIEWCOB), the CALL statement makes a case specific reference to the program name as specified in the PROGRAM-ID declaration. In a system where the cases match on the first CALL, but not on the second CALL, subprogram values from the first CALL are not retained. For example, a COBOL program CALLs a subprogram named BOB, (PROGRAM-ID. BOB.). Independent of case, COBOL loads and runs the program, BOB, then returns. If we make a second call, but this time CALL bob, BOB is loaded but the values from the previous CALL are not retained. It is as though we are CALLing a module that has not previously been executed, but is known as BOB. (Modifying the PROGRAM-ID declaration in the CALLed program alters execution results.) In effect, the run time is not case sensitive when loading and running CALLed programs. However, it is case sensitive with regard to retaining data. Microsoft is researching this problem and will post new information as it becomes available.

Additional reference words: 2.20 Copyright Microsoft Corporation 1993.