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



Then also:

select custid from cusmst into :@custid

where custid and @custid are 5A at compile time then custid is changed to
5,0.

If the pgm is not recompiled then there will be a run time error.

Correct?  If so I still don't understand why using * is bad form.  It seems
to me that using embedded sql at all is inherently less safe than using
native I/O.

Personally I have not been in a situation where the database was changed
(other than app's still under development) except for Y2K.  That may be why
I'm having a hard time seeing this.

Phil

> -----Original Message-----
> From: rpg400-l-admin@midrange.com [mailto:rpg400-l-admin@midrange.com]On
> Behalf Of MWalter@hanoverwire.com
> Sent: Friday, September 14, 2001 1:46 PM
> To: rpg400-l@midrange.com
> Subject: RE: SQL Problem
>
>
>
> Regardless of how you change the table, DDS or SQL, if you change the
> structure of the table, and the corresponding host DS is not changed. You
> run the risk of contaminating a field in the data structure.
> Maybe adding a
> field to a table was a bad example. Changing the field length of a field
> might be a better one. Here is a scenario.
>
> You have a table, say: CharField1 10, CharField2, 10, ZoneField1 5,0
> ZoneField2 5,0.
> You write a program specifying your table as the EXTNAME in your hostds.
>
> Now you change the length of CharField2 to 15. You don't compile the
> program. Your host ds still says that CharField2 is 10. When the record is
> fetched into HostDS, wouldn't ZoneField1 contain character data?
>
> Maybe I'm wrong about this. I haven't tried to prove it. If I am, by all
> means let me know.
>
>
> Thanks,
>
> Mark
>
>
> Mark Walter
> Sr. Programmer/Analyst
> Hanover Wire Cloth a div of CCX, Inc.
> mwalter@hanoverwire.com
> http://www.hanoverwire.com
> 717.637.3795 Ext.3040
>
> <SNIP>
>
> You can use ALTER TABLE in SQL to add a field. I THINK,  if  you add a
> field
> using ALTER TABLE and leave it null capable, your existing programs should
> continue to run without any problems.
>
>
> _______________________________________________
> 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
> or email: RPG400-L-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.
>


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com



As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.