000100 IDENTIFICATION DIVISION.
000200 PROGRAM-ID. COB1B.
000210 AUTHOR. SAS INSTITUTE.
000215*
000220****************************************************************
000232*                COPYRIGHT (C) 1995, SAS INSTITUTE INC.
000234*                  UNPUBLISHED - ALL RIGHTS RESERVED
000236*                     S A S / C   S A M P L E
000238*
000240*
000242*
000244*            NAME: COB1B
000246*        LANGUAGE: COBOL
000248*         PURPOSE: This COBOL subprogram is called by a C main
000250*                  which passes it a pointer to a string. It
000251*                  in turn calls another C subroutine to
000252*                  convert the string to upper case.
000253*      MVS -
000254*         COMPILE: See JCL in SAMPLE.AUX(COBOLJCL).
000255*            LINK: See JCL in SAMPLE.AUX(COBOLJCL).
000256*         EXECUTE: See JCL in SAMPLE.AUX(COBOLJCL).
000257*      TSO -
000258*         COMPILE: Use COBOL compiler.
000259*            LINK: LINK, using link cards SAMPLE.AUX(COBOLJCL).
000260*         EXECUTE: Call  CCOBOL.
000261*      CMS -
000262*         COMPILE: Use COBOL compiler.
000263*            LINK: LINK, using link cards SAMPLE.AUX(COBOLJCL).
000264*         EXECUTE: Call  CCOBOL.
000265*           NOTES:
000266*           INPUT: none
000268*          OUTPUT: Printed string before and after
000270*                  call to COBOL
000272*           USAGE:
000274*    SYSTEM NOTES: The COBOL routine ILBOSTP0 initializes the
000276*                  COBOL environment.  It should be the first
000278*                  routine called in the C main.
000280*      MISC NOTES: The routines COB1A and COB1C are also
000282*                  required.
000284*                  Make sure to compile with NODYNAM!!
000286*                  THIS IS A NON-ILC EXAMPLE.
000288****************************************************************
000290*
000300 ENVIRONMENT DIVISION.
000400 CONFIGURATION SECTION.
000500 SOURCE-COMPUTER. IBM-370.
000600 OBJECT-COMPUTER. IBM-370.
000700 INPUT-OUTPUT SECTION.
000800 FILE-CONTROL.
000900 I-O-CONTROL.
000910
001000 DATA DIVISION.
001100 FILE SECTION.
001200 LINKAGE SECTION.
001221 77  BUFFER   PIC X(26).
001240
001600 PROCEDURE DIVISION USING BUFFER.
001610
001620 001-TO-UPPER.
001630     DISPLAY "COBOL: Alphabet with alternating case: " BUFFER.
001700     CALL "COB1C" USING BUFFER.
001701     DISPLAY "COBOL: Alphabet with all-upper case:   " BUFFER.
001703
001704 999-EXIT.
001705     EXIT PROGRAM.
001900