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



Just use harcoded space literals in your insert statement. Assuming your
filler fields are after the fields CHKDAT, CHKNUM, VENDOR, your insert sql
would look like:

c/exec sql
c+ insert into mhtrsvp
c+  select clabrn,cladat,claseq,
c+         clanum,clalin,compno,
c+         chkdat,' ', chknum,' ', vendor,' '
c+  from mheopfp where subsys = 'CP'
c/end-exec


-----Original Message-----
From: Richard Reeve [ mailto:richreeve@yahoo.com
<mailto:richreeve@yahoo.com> ]
Sent: Tuesday, December 18, 2001 7:05 AM
To: rpg400-l@midrange.com
Subject: Embedded SQL - Insert


--
[ Picked text/plain from multipart/alternative ]

All,

     I have an RPGIV program that does an insert to write records to a file.
The format of the file has now changed and has filler between the fields.
Can I still use the embedded SQL to accomplish the writing of the new
records and if so how?  I have included a copy of the code.  My real
question is how I will go about populating the filler fields.

c/exec sql
c+ insert into mhtrsvp
c+  select clabrn,cladat,claseq,
c+         clanum,clalin,compno,
c+         chkdat,chknum,vendor
c+  from mheopfp where subsys = 'CP'
c/end-exec

The new file format looks like this;

A..........T.Name++++++RLen++TDpB......Functions+++++++++++++
A          R RECONR
A*
A            RFILL1         5          COLHDG('Filler')
A            RACCTN        10S 0       COLHDG('Account No.')
A            RCHKNO        10S 0       COLHDG('Check Number')
A            RAMT          10S 2       COLHDG('Check Amt')
A            RDATE          6A         COLHDG('Check Date')
A            RFILL2         2          COLHDG('Filler')
A            RNAME         15A         COLHDG('Check Name')
A            RFILL3        22          COLHDG('Filler')
A*

Thanks for any suggestions.

Rich







---------------------------------
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctionsfor all of your holiday gifts!
_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
<http://lists.midrange.com/cgi-bin/listinfo/rpg400-l>
or email: RPG400-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l
<http://archive.midrange.com/rpg400-l> .




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.