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



William,

You don't even need to use SQL. You can do it with just DDS.

Basically,
1) Create new PF with a new name and your new field using DDS or DDL, it
doesn't matter.
2) Repoint existing logicals to new PF. If the logicals shared the record
format of the PF (ie. they don't have fields explicity listed), then you'll
need to list the original fields leaving out the new one.
3) Convert the original PF to a LF, since it already has the original
fields listed without the new it's you don't need to do anything else.

optional - if you need it.
4) Create new logicals that include the new field(s) for any program to use
that needs the new field.

Here's the key thing: Compare the record "format level identifier" of the
original PF and LF to the replacement LFs
From DSPFD
Record Format List
Record Format Level
Format Fields Length Identifier
CORCUST1 217 973 3CD864E095606

As long as the record format level identifier is that same before and
after, you don't need to recompile any programs. If they don't match, use
DSPFFD and other tools to figure out what fields you defined wrong and try
again.

Going forward, make sure any new RPG programs using RLA go through a
logical and you can add new fields to the physical without any recompiling.

Heck, it's possible, though unlikely in my experience unless your original
PF doesn't have a unique key, that all your existing RPG programs already
use a logical. In which case, you don't even need to create a new PF.
Just make sure the existing LFs list the fields then add the new field to
the PF and a new logical.

Note assuming any new logicals have the same key as an existing, the new
logicals basically have no overhead; as the (space and time) overhead
involved for a LF is all in the maintainence of the access path.

This redbook lays out the technique in chapters 3 & 4
http://publib-b.boulder.ibm.com/abstracts/sg246393.html?Open

Again, while the redbook shows using SQL to define the new PF and even some
of the existing logicals, you can use DDS if you want.


HTH,
Charles




On Sun, Jan 5, 2014 at 9:39 AM, William Salim <william.salim@xxxxxxxxx>wrote:

Dieter.. interesting, but i got no clue for that. is there any samples?

Thanks



On Sun, Jan 5, 2014 at 9:32 PM, Henrik Rützou <hr@xxxxxxxxxxxx> wrote:

Dieter

are you suggesting to change the original file from probably DDS defined
to
SQL defined
and then add a logical file the correspond to the originally file on top
?




On Sun, Jan 5, 2014 at 3:29 PM, William Salim <william.salim@xxxxxxxxx
wrote:

Wow ok then. I will try for this.

Thank you very much all :)
On Jan 5, 2014 9:24 PM, "Henrik Rützou" <hr@xxxxxxxxxxxx> wrote:

Triggers dosn't change the file in any way the only thing is
happening
is
that
the trigger program is called when any update of the file is done




On Sun, Jan 5, 2014 at 3:22 PM, William Salim <
william.salim@xxxxxxxxx
wrote:

Thanks guys,
Perhaps i will try do the trigger and have analysys on that.
The rule is files cannot be changed. Hopefully trigger will not
change
the
level check of the main files.

Thanks
On Jan 5, 2014 9:08 PM, "Henrik Rützou" <hr@xxxxxxxxxxxx> wrote:

Then you should write a trigger program that records changes to
the
file.






On Sun, Jan 5, 2014 at 2:57 PM, William Salim <
william.salim@xxxxxxxxx
wrote:

First of all, there are no journals and files cannot added new
fields..
Files used by many old programs that strictly cannot changed
and
do
those
two things (journal and add field).
Bad design but need alternative solutions..

Thanks
On Jan 5, 2014 8:48 PM, "Henrik Rützou" <hr@xxxxxxxxxxxx>
wrote:

As suggested - add a creation data field to the record

or ...

journal the file

or

add a trigger program that records when records are added


On Sun, Jan 5, 2014 at 2:31 PM, Bill Wragg <
bill_wragg@xxxxxxxx>
wrote:

Only solution is to add a date field to the record and when
it
is
created
populate it with the date.

Good Luck

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:
rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of William Salim
Sent: January-05-14 7:17 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: Get Record Creation Date

Hi Everyone..

I look something that RPG or Any other language can have
the
capability
to
get the creation date for the record that has been created
in
files
(PF/LF).

i have try to do the exploration using the QDBRTVFD but
still
no
result,
the
API only gave the last updated files not record.

is there any solutions for this?, i really appreciate
whether
it
will
do
another language or process in I series


Thanks

--
Regards,

William Salim
--
This is the RPG programming on the IBM i (AS/400 and
iSeries)
(RPG400-L)
mailing list To post a message email:
RPG400-L@midrange.comTo
subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at
http://archive.midrange.com/rpg400-l.

--
This is the RPG programming on the IBM i (AS/400 and
iSeries)
(RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.




--
Regards,
Henrik Rützou

http://powerEXT.com <http://powerext.com/>
--
This is the RPG programming on the IBM i (AS/400 and iSeries)
(RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


--
This is the RPG programming on the IBM i (AS/400 and iSeries)
(RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.




--
Regards,
Henrik Rützou

http://powerEXT.com <http://powerext.com/>
--
This is the RPG programming on the IBM i (AS/400 and iSeries)
(RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


--
This is the RPG programming on the IBM i (AS/400 and iSeries)
(RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.




--
Regards,
Henrik Rützou

http://powerEXT.com <http://powerext.com/>
--
This is the RPG programming on the IBM i (AS/400 and iSeries)
(RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


--
This is the RPG programming on the IBM i (AS/400 and iSeries)
(RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.




--
Regards,
Henrik Rützou

http://powerEXT.com <http://powerext.com/>
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.




--
Regards,

William Salim
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



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.