z/OS Language Environment Writing Interlanguage Communication Applications
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Signed one-byte character data with extern "COBOL"

z/OS Language Environment Writing Interlanguage Communication Applications
SA38-0684-00

Sample C++ usage COBOL subroutine
#include <stdio.h>
#include <stdlib.h>
extern "COBOL" {void COBRTN (char*);}

  int main()
  {
  char x;
  x='a';
COBRTN(&x);   /* x by reference */
exit(0);
}
IDENTIFICATION DIVISION.
PROGRAM-ID. COBRTN.
ENVIRONMENT DIVISION.
DATA DIVISION.
LINKAGE SECTION.
01 X PIC X.
PROCEDURE DIVISION USING X.
     DISPLAY X
     GOBACK.
END PROGRAM COBRTN.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014