I am attempting to create a global temporary table in a COBOL program. I am getting the followoing messages:
DSNH029I E DSNHAPL2 LINE 795 COL 15 "INTO" CLAUSE REQUIRED
DSNH050I I DSNHMAIN WARNINGS HAVE BEEN SUPPRESSED DUE TO LACK OF TABLE DECL
the following are the parts of the program as I coded it:
EXEC SQL
DECLARE GLOBAL TEMPORARY TABLE TEMP_MAC
(MACBANK CHAR(2) NOT NULL,
MACDATEG CHAR(18) NOT NULL,
MACDATEJ CHAR(6) NOT NULL,
MACNAME CHAR(40) NOT NULL,
MACPLNIN CHAR(1) NOT NULL
)
END-EXEC.
000-INITIALIZATION-EXIT.
EXIT.
EXEC SQL
INSERT INTO TEMP_MAC
(MACBANK,
MACDATEG,
MACDATEJ,
MACNAME,
MACPLNIN
)
VALUES
WS-MACBANK,
:WS-MACDATEG,
:WS-MACDATEJ,
:WS-MACNAME,
:WS-MACPLNIN
)
END-EXEC.
EXEC SQL
SELECT *
FROM TEMP_MAC
FETCH FIRST 10 ROWS ONLY
END-EXEC.
100-READ-WRITE-EXIT.
Can any anyone assist me?
thanks
DSNH029I E DSNHAPL2 LINE 795 COL 15 "INTO" CLAUSE REQUIRED
DSNH050I I DSNHMAIN WARNINGS HAVE BEEN SUPPRESSED DUE TO LACK OF TABLE DECL
the following are the parts of the program as I coded it:
EXEC SQL
DECLARE GLOBAL TEMPORARY TABLE TEMP_MAC
(MACBANK CHAR(2) NOT NULL,
MACDATEG CHAR(18) NOT NULL,
MACDATEJ CHAR(6) NOT NULL,
MACNAME CHAR(40) NOT NULL,
MACPLNIN CHAR(1) NOT NULL
)
END-EXEC.
000-INITIALIZATION-EXIT.
EXIT.
EXEC SQL
INSERT INTO TEMP_MAC
(MACBANK,
MACDATEG,
MACDATEJ,
MACNAME,
MACPLNIN
)
VALUES
WS-MACBANK,
:WS-MACDATEG,
:WS-MACDATEJ,
:WS-MACNAME,
:WS-MACPLNIN
)
END-EXEC.
EXEC SQL
SELECT *
FROM TEMP_MAC
FETCH FIRST 10 ROWS ONLY
END-EXEC.
100-READ-WRITE-EXIT.
Can any anyone assist me?
thanks