Microsoft KB Archive/33704

Porting IBM Mainframe OS/VS and VS COBOL/II to MS COBOL 3.00

PSS ID Number: Q33704 Article last modified on 06-13-1990

3.00 3.00a | 3.00 3.00a MS-DOS | OS/2

Summary: The following application note describes how to convert programs from IBM mainframe COBOL to Microsoft COBOL Version 3.00 or 3.00a. A printed copy of this application note, “COBOL 3.0 Porting OS/VS and VS/2 Applications,” is also available. Application notes can be obtained by calling Microsoft Product Support Services at (206) 454-2030. This application note covers the following three topics: 1. Compiler directives 2. Downloading files from the mainframe 3. Additional support options for mainframe programmers available from Micro Focus

More Information:

PORTING IBM OS/VS and IBM VS COBOL/II APPLICATIONS TO MICROSOFT COBOL VERSION 3.00 FOR MS-DOS AND OS/2 —————————————————

Compiler Directives
 OS/VS Specifies use of the IBM OS/VS COBOL language-extensions reserved word list. VSC2 Specifies use of the IBM VS COBOL/II language-extensions reserved word list. OLDVSC2 Specifies use of the IBM VS COBOL/II (Release 1) language extensions reserved word list, which means that the following is true:  No explicit scope delimiter is allowed in a statement without a conditional phrase. The word ALSO in an EVALUATE statement can be omitted.  SIGN“EBCDIC” Specifies that signs are to be interpreted as EBCDIC for numeric display items with embedded signs, that is, those without SIGN IS SEPARATE. This process may be necessary when files have been downloaded from a mainframe. NATIVE“EBCDIC” Specifies the default collating sequence for comparisons, searches, and sorts.</li> IBMCOMP Specifies USAGE COMP fields to be aligned on 2- or 4-byte word boundaries. In OS/VS COBOL, S9(1) to S9(4) all take 2 bytes, S9(5) to S9(9) all take 4 bytes, and S9(10) to S9(18) all take 8 bytes (one double word) of storage.</li> OLDCOPY Specifies COPY statements to operate in the ANSI ’68 standard. IBM OS/VS COBOL accepts either the ’68 or ’74 standard. (’74 - ’85 only accept a literal, but ’68 must COPY with a data name defined in the WORKING-STORAGE SECTION.)</li> PERFORM-TYPE“OS/VS” Specifies PERFORM verb exits to execute as they do in IBM OS/VS COBOL. PERFORM statements with the same exit can be nested to a depth of two (one inner and one outer). If nested further, the entry points will be lost. For example, the third level will cause the first entry point to be lost.</li></ol>

Downloading Files from the Mainframe
 Source Files  Download as ASCII file with carriage return/linefeed, (CRLF), record delimiters.</li> Watch out for hex characters in literals.</li></ol> </li> Data Files  Download as ASCII file with or without CRLF record delimiters (with CRLF = LINE SEQUENTIAL, without CRLF = RECORD SEQUENTIAL).</li> COMP and COMP-3 fields must be converted to USAGE DISPLAY before downloading.</li> Keyed or Relative files must be downloaded as Sequential files then “rebuilt” on the PC.</li></ol> </li> File Organizations  SEQUENTIAL - Support for fixed or variable length records with LINE/RECORD SEQUENTIAL.</li> <li>RELATIVE - Support for fixed or variable-length records.</li> <li>ISAM - Supported.</li> <li>VSAM - Supported for only keyed VSAM files with ISAM.</li></ol> </li></ol>

Additional Support Options for Mainframe Programmers Available from Micro Focus (800) 872-6225 —————————————————– The following additional compiler directives are reserved for use with Micro Focus add-on products, and their defaults should not be changed unless you have the particular add-on product: CHARSET“EBCDIC” PC-CICS IMSVS86 GANIM

Copyright Microsoft Corporation 1990.