× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I am trying to learn something new with doing DDL files. I have the
file defined as:

CREATE TABLE LIBRARY.TRANYYMMDD (
ID INTEGER NOT NULL WITH DEFAULT 0,
        TRANSACTIONID FOR COLUMN TRANSID CHAR (40 ) NOT NULL WITH DEFAULT '' ,
SYSTEMKEY1 VARCHAR(50) CCSID 37 NOT NULL DEFAULT '' ,
SYSTEMKEY2 VARCHAR(50) CCSID 37 NOT NULL DEFAULT '' ,
SYSTEMCODEID FOR COLUMN SYSCODEID CHAR(10) CCSID 37 NOT NULL DEFAULT '' ,
TRANSACTIONTYPE FOR COLUMN TRANTYPE INTEGER NOT NULL DEFAULT 0 ,
AMOUNTPAID FOR COLUMN AMTPD DECIMAL(10, 2) NOT NULL DEFAULT 0 ,
CUSTOMERNAME FOR COLUMN CUSTNAME VARCHAR(50) CCSID 37 NOT NULL DEFAULT '' ,
CUSTOMERADDRESS1 FOR COLUMN CUSTADDR1 VARCHAR(50) CCSID 37 NOT NULL DEFAULT '' ,
CUSTOMERADDRESS2 FOR COLUMN CUSTADDR2 VARCHAR(50) CCSID 37 NOT NULL DEFAULT '' ,
CUSTOMERCITY FOR COLUMN CUSTCITY VARCHAR(50) CCSID 37 NOT NULL DEFAULT '' ,
CUSTOMERSTATE FOR COLUMN CUSTSTATE CHAR(2) CCSID 37 NOT NULL DEFAULT '' ,
CUSTOMERZIP FOR COLUMN CUSTZIP CHAR(10) CCSID 37 NOT NULL DEFAULT '' ,
CUSTOMERPHONE FOR COLUMN CUSTPHONE VARCHAR(20) CCSID 37 NOT NULL DEFAULT '' ,
CUSTOMEREMAIL FOR COLUMN CUSTEMAIL VARCHAR(100) CCSID 37 NOT NULL DEFAULT '' ,
PAYMENTDATE FOR COLUMN PAYDATE DATE NOT NULL DEFAULT CURRENT_DATE ,
PAYMENTTIME FOR COLUMN PAYTIME TIME NOT NULL DEFAULT CURRENT_TIME ,
HASMULTIPLE FOR COLUMN HASMULTI CHAR(1) CCSID 37 NOT NULL DEFAULT '',
PRIMARY KEY( ID ));

Also, I am trying to use data structures for the file IO.

     FTRANYYMMDDIF   E           K DISK    rename(TRANYYMMDD:TRANYMDR) usropn
     D TRANYMD_I       DS                  likerec(TRANYMDR:*input)
      /free
       read TRANYMDR TRANYMD_I;
      /end-free

Now for the problem. Fields aren't coming in right as shown in this
image (http://goo.gl/SFz27). It looks like the fields don't all line
up properly but I don't understand why. Here is what the DS looks like
when it is brought into the program (http://goo.gl/EM1BI).

What might I be doing wrong?

--
Mike Wills
http://mikewills.me

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.