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




Hello Everybody,

I have the following two physical file...

File 1:
CUSTID        18S 0      ALIAS(QTE_CUST_ID)
QUOTID       18S 0      ALIAS(QTE_ID)
QUOTDT          L         ALWNULL   ALIAS(QTE_DATE_TIME_STAMP)
AGNTID          9B 0     ALWNULL   ALIAS(QTE_AGENT_ID)
REFFID           9B 0     ALWNULL   ALIAS(QTE_REFERRAL_ID)
SLSUNT         3S 0     ALWNULL   ALIAS(QTE_SALES_UNIT)
LONAPP         9B 0     ALWNULL   ALIAS(QTE_LOAN_APP_NUM)
LONACT         9B 0     ALWNULL   ALIAS(QTE_ACCOUNT_NUM)
CLOSTA         4A         ALWNULL   ALIAS(QTE_FIN_CLOSING_STATE)
SRCTYP         9B 0     ALWNULL   ALIAS(QTE_SOURCE_TYPE)
PEZLON         9B 0      ALWNULL   ALIAS(QTE_LOAN_TYPE)

File2:
CUSTID          9P 0
QUOTID         9P 0
QUOTDT          L
AGNTID        10P 0
REFFID         10P 0
SLSUNT         3P 0
LONAPP       10P 0
LONACT       10P 0
CLOSTA         2A
SRCTYP      10P 0
PEZLON       10P 0

When i copy the File1 to File2, i run the following Sql statement...

C/EXEC SQL
C+ INSERT INTO File2 (CUSTID, QUOTID, QUOTDT, AGNTID,
C+                  REFFID, SLSUNT, LONAPP, LONACT, CLOSTA, SRCTYP, PEZLON)
C+ SELECT CUSTID, QUOTID,
C+         IFNULL(QUOTDT,DATE('1900-01-01')),
C+         IFNULL(AGNTID,0),
C+         IFNULL(REFFID,0),
C+         IFNULL(SLSUNT,0),
C+         IFNULL(LONAPP,0),
C+         IFNULL(LONACT,0),
C+         IFNULL(CLOSTA,'--'),
C+         IFNULL(SRCTYP,0),
C+         IFNULL(PEZLON,0)
C+ FROM File1
C/END-EXEC


My question is, when i run the sql statement, do you guys think i would have 
any chance is loosing the data ( like truncation ..).

I did check the values in File2, it seems ok to me but i want to know what you 
guys think.

Please let me know if you guys think there would any chance that data would be 
lost when i copy the data to file2.

Thanks.
Gade.



+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

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.