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


Structure without #pragma

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

Sample COBOL usage C function
IDENTIFICATION DIVISION.
PROGRAM-ID. COBRTN.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
O1 STRUC1.
    05 S11 PIC S9(9) BINARY.
    05 S12 PIC S9(9) BINARY.
PROCEDURE DIVISION.
    CALL "CENTRY" RETURNING STRUC1.
    GOBACK.
END PROGRAM COBRTN.
#include <stdio.h>
struct stype {
  int s1;
  int s2;  };
struct stype centry()
{
  struct stype struc2;
  struc2.s1=3;
  struc2.s2=4;
  return struc2;
}

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014