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



Vern and Eric,

Thanks for the replies.

Well, you can use DDS and CHGPF to re-order the fields in a physical file, though I fail to see why one would want to do that. I have used it, usually, to add new fields or drop unnecessary filler fields.

I agree with Eric that it could be a pain to keep track of a table's creation with a set of CREATE TABLE and ALTER TABLE scripts. Maybe MKS, et al, could keep track of this easily, but I like to keep things simple and as easily understandable as possible for both me and the next guy/gal.

Jerry C. Adams
IBM System i Programmer/Analyst
--
B&W Wholesale
office: 615-995-7024
email: jerry@xxxxxxxxxxxxxxx


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Vern Hamberg
Sent: Monday, July 27, 2009 4:53 PM
To: RPG programming on the IBM i / System i
Subject: Re: RPG400-L Digest, Vol 8, Issue 563

Jerry

ALTER TABLE is very much like CHGPF - of course, you need DDS to use the
latter. Someone in the thread said that you could re-order fields with
CHGPF - have never tried that. I don't think you can with ALTER TABLE,
only DROP or ADD to the end. But I've wrong once or twice before.

Vern

Jerry Adams wrote:
I, too, have gotten the "Data loss may occur" when using CHGPF. In all cases it came when I was dropping some filler field that a S/34/36 programmer (that did not really understand blocking) had inserted to make the field some factor of 256. Pressing help (F1) on the error will, IIRC correctly, tell you what field is being dropped or truncated.

I have taken to using SQL's DDL to define tables in the last couple of years. I have never had to change those tables, but I have wondered if ALTER Table worked like CHGPF. Haven't tried it nor RTFM nor searched the archives in this regard. When a real need arises, I will.

Thanks.

Jerry C. Adams
IBM System i Programmer/Analyst
--
B&W Wholesale
office: 615-995-7024
email: jerry@xxxxxxxxxxxxxxx


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of dale janus
Sent: Monday, July 27, 2009 8:16 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: RPG400-L Digest, Vol 8, Issue 563

Hmmm, why not use CHGPF?

Because old habits die hard?

Because the first time I tried CHGPF I got a warning message that scared
me that I could lose data?

Because you're in a hurry?

CHGPF sounds like a better way of doing things that I will try next time.
Thanks for the suggestions.

---Dale

Why do you use CPY instead of just doing a CHGPF on the file once you added the new fields to the source? You can add the fields anywhere you want and the CHGPF takes care of mapping the data

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of dale janus
Sent: Friday, July 24, 2009 4:41 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: timestamp data type in DDS

Thanks to all who pointed out my dumb mistake of using *nochk instead of
*map and *drop. That fixed it.

I wish PHP would say "invalid data" instead of Fetch failed. But at
least now I know what to look for.

I will sign up to midrange -l and ask future questions like this over
there, for those who suggested that approach.

Thanks.

---Dale

IMPORTANT: This email is intended for the use of the individual
addressee(s) named above and may contain information that is
confidential, privileged or unsuitable for overly sensitive persons with
low self-esteem, no sense of humor or irrational religious beliefs. If
you are not the intended recipient, any dissemination, distribution or
copying of this email is not authorized (either explicitly or
implicitly) and constitutes an irritating social faux pas. Unless the
word absquatulation has been used in its correct context somewhere other
than in this warning, it does not have any legal or no grammatical use
and may be ignored. No animals were harmed in the transmission of this
email, although the terrier next door is living on borrowed time, let me
tell you. Those of you with an overwhelming fear of the unknown will be
gratified to learn that there is no hidden message revealed by reading
this warning backwards, so just ignore that Alert Notice from Microsoft.
However, by pouring a complete circle of salt around yourself and your
computer you can ensure that no harm befalls you and your pets. If you
have received this email in error, please add some nutmeg and egg
whites, whisk and place in a warm oven for 40 minutes.



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.