× 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.



6.1

Maybe I'll do the same. I _feels_ weird to me.

--
Mike Wills
http://mikewills.me



On Wed, Jul 13, 2011 at 1:59 PM, DeLong, Eric <EDeLong@xxxxxxxxxxxxxxx> wrote:
I took your SQL and RPG source and created the file and program.

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

Stepped through in debug (stopped after read), displayed TRANYMD_I.  I did not have any problems.  What version IBM i OS?

-Eric DeLong

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Mike Wills
Sent: Wednesday, July 13, 2011 9:30 AM
To: RPG programming on the IBM i / System i
Subject: DDL, likerec DS, and Problems...

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
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.