Hello,
Am out of the working world now but working on a project that requires
me to know what the output looks like from an IBM mainframe DCLGEN
operation.
In my days it would look something like the example below. Would it
look just the same today?
In TOTAL-CARS would the PIC spec be a series of 9's or would there be
replication brackets?
Any examples would be really helpful.
Also, when I do a similiar operation on my PC on a table (forget the
terminolgy, obviously something similiar), I don't get the DB2 area,
just the COBOL. Am using DB2 V7.1. Has that changed with later
versions? In particular, if somebody handed me that output, there's no
visible way of telling that it represents a DB2 table. Am I wrong?
Please, thanks,
Graham
This is a very old mainframe example, sorry about the formatting!
************************************************** ****************
* DCLGEN TABLE(DD10DATA) *
* LIBRARY(TWIGGYH.A.GS(SWSNUTS)) *
* ACTION(REPLACE) *
* LANGUAGE(COBOL) *
* APOST *
* ... IS THE DCLGEN COMM... LLOWING STATEMENTS *
************************************************** ****************
EXEC SQL DECLARE DD10DATA TABLE
( CUST_NUMB CHAR(5) NOT NULL,
CUST_NAME CHAR(33) NOT NULL,
ADDRESS_1 CHAR(33) NOT NULL,
ADDRESS_2 CHAR(31) NOT NULL,
POST_CODE CHAR(7) NOT NULL,
ATTENTION CHAR(10) NOT NULL,
VAT_REGTN_VVVVVVVVVVVVVV_REGTN CHAR(10) NOT NULL,
IN_STOCKS_TTTTTTTTTTTX DECIMAL(7, 0) NOT NULL,
TOTAL_CARS DECIMAL(7, 0) NOT NULL,
ZD_FIELD DECIMAL(3, 1) NOT NULL,
ZU_FIELD DECIMAL(3, 2) NOT NULL
) END-EXEC.
************************************************** ****************
* COBOL DECLARATION FOR TABLE DD10DATA *
************************************************** ****************
01 DCL-DD10DATA.
10 CUST-NUMB PIC X(5).
10 CUST-NAME PIC X(33).
10 ADDRESS-1 PIC X(33).
10 ADDRESS-2 PIC X(31).
10 POST-CODE PIC X(7).
10 ATTENTION PIC X(10).
10 VAT-REGTN-VVVVVVVVVVVVVV-REGTN PIC X(10).
10 IN-STOCKS-TTTTTTTTTTTX PIC S9999999V USAGE COMP-3.
10 TOTAL-CARS PIC S9999999V USAGE COMP-3.
10 ZD-FIELD PIC S9(2)V9(1) USAGE
COMP-3.
10 ZU-FIELD PIC S9(1)V9(2) USAGE
COMP-3.
************************************************** ****************
* THE NUMBER OF COLUMNS DESCRIBED BY THIS DECLARATION IS 11
*
************************************************** ****************
--
Posted via a free Usenet account from http://www.teranews.com