MIDRANGE dot COM Mailing List Archive



Home » RPG400-L » May 1997

Re: Deleting from physical files


  • Subject: Re: Deleting from physical files
  • From: SCross1234@xxxxxxx
  • Date: Thu, 8 May 1997 08:45:34 -0400 (EDT)

fixed

In a message dated 97-05-08 06:41:31 EDT, you write:

<< I am a trainee programmer on RPG/400, I have a small problem....
 I created physical file and used UPDDTA to enter data into it. Later on I
 changed the physical file fields. I also based a logical on this physical
 file with a key .
 
 But now when I want to enter the data in the new physical file it gives me
 the old fields. Obviously , I have not deleted the data/physical file. In
 the DDS listing I can't see any mention of the old physical file , the new
 physical with the new fields is there.
  >>

It sounds like you didn't recompile the physical file after you changed the
fields.  If this is true you want to save the old phyical file to a temporary
name because when you compile the physical file, it will delete all the
records in it.  Once you have the file created again you can use a CPYF with
a FMTOPT of *map.  This is only true if you didn't change the size of the
fields, or location in the fields.  If you did and do not feel like keying
all of the data over, you can write a small program to read the old file and
write to the new.  Also, you will have to delete the logical(s) first before
you can create a new physical file.

HTH,
Steve Cross
Fox River Foods, Inc
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the RPG/400 Discussion Mailing List!  To submit a new         *
* message, send your mail to "RPG400-L@midrange.com".  To unsubscribe   *
* from this list send email to MAJORDOMO@midrange.com and specify       *
* 'unsubscribe RPG400-L' in the body of your message.  Questions should *
* be directed to the list owner / operator: david@midrange.com          *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *






Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot 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 here. If you have questions about this, please contact