Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CHGPF Don't change all LF

379 views
Skip to first unread message

Francesco Candia

unread,
May 4, 1998, 3:00:00 AM5/4/98
to

This is an old question I repost because no one responded.
I have a Phisical File with two logical files.
One of the logical has the keyword FORMAT and the other no.
If I make a chage to the Phisical file (eg. The Colhdg keyword) and
run CHGPF command, the change is reflected only to the logical file
without the FORMAT keyword.
So, I have to recompile the other logical file.
My question is:
I need to know with a program if a logical file will be modified
during a CHGPF command or not. How? There is a command or an API?
I apogize for my terrific english.
Francesco Candia
Via Monte Cervino 1/9
10090 Gassino Torinese
Italy
fca...@tin.it
francesc...@bigfoot.com

Charles R. Pence

unread,
May 4, 1998, 3:00:00 AM5/4/98
to

APAR= SA67752
To determine the logical files that will be <or have been>
changed to match the changes in the physical file, the
request to DSPDBR RCDFMT(*ALL) on the physical file will
provide a list of those logical files.
-
The list of logical files listed in DSPDBR MBR(*NONE) on
the physical file will show all affected files.
-
The list of files obtained as a result of the exclusion of
the latter list <ie. MBR(*NONE)> from the former list <ie.
RCDFMT(*ALL)>
is the list of files which will not reflect changes to the physical
file.

This set logic can be obtained via SQL partial outer join, SQL WHERE
with
NOT EXIST or NOT IN given output to *OUTFILE; or programmed logic over
the
retrieved data from the database relations API -- sorry I don't
remember
the name.

Regards, Chuck
-- Comments provided "as is" with no warranties of any kind whatsoever.

Johan Verrips

unread,
May 5, 1998, 3:00:00 AM5/5/98
to

On Mon, 04 May 1998 20:01:40 GMT, fca...@tin.it (Francesco Candia)
wrote:

>This is an old question I repost because no one responded.
>I have a Phisical File with two logical files.
>One of the logical has the keyword FORMAT and the other no.
>If I make a chage to the Phisical file (eg. The Colhdg keyword) and
>run CHGPF command, the change is reflected only to the logical file
>without the FORMAT keyword.
>So, I have to recompile the other logical file.
>My question is:
>I need to know with a program if a logical file will be modified
>during a CHGPF command or not. How? There is a command or an API?
>I apogize for my terrific english.
>Francesco Candia
>Via Monte Cervino 1/9
>10090 Gassino Torinese
>Italy
>fca...@tin.it
>francesc...@bigfoot.com

The changes in record-layout of Physical Files (PF) can be observed by
the record level identifier. This is an - by the as/400 - generated
hash number. Whenever you add, change or remove fields or *some* of
the field properties (those who affect the record-layout)), the record
level identifier will change.


Now your question : you say there are two logicals on one PF. You
change the PF with a COLHDG parameter. This does *not* change the
record-layout, only the display when you use RUNQRY etc.
But when you change a Packed variable into a Zoned for instance, you
should see a difference.
You can see the record-level identifier with de DSPFD.

When you change a PF you always have to recompile the logical (??) You
can't even compile a PF without first deleting all the dependent
logical files (DSPDBR).
However,l what are the parameters of the FORMAT keyword, does it refer
to the correct PF.

Hope this help you in the right direction.


Regards,

Johan Verrips

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Houthandel Heuvelman Tel +31180688615
Johan Verrips Mobile +31655336781
Email : j...@heuvelman-hout.nl
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Charles R. Pence

unread,
May 5, 1998, 3:00:00 AM5/5/98
to

Johan Verrips wrote:
> <<SNIP>>

> When you change a PF you always have to recompile the logical (??) You
> can't even compile a PF without first deleting all the dependent
> logical files (DSPDBR).
> However, what are the parameters of the FORMAT keyword, does it refer
> to the correct PF.
>

Johan, there is support <since V3R2?> to allow CHGPF with source to
effect what is essentially SQL ALTER TABLE support. Please refer to my
previous post for what I hope is the answer sought.

Obelix

unread,
May 8, 1998, 3:00:00 AM5/8/98
to

On Mon, 04 May 1998 20:01:40 GMT, fca...@tin.it (Francesco Candia)
wrote:

>One of the logical has the keyword FORMAT and the other no.
I'm really wondering why you put the FORMAT keyword in a logical
file...
Obelix

Francesco Candia

unread,
May 18, 1998, 3:00:00 AM5/18/98
to

fca...@tin.it (Francesco Candia) wrote:


>.....I need to know with a program if a logical file will be modified
>during a CHGPF command or not. How? There is a command or an API?.....
Thanks to everibody for answers and few more things.
Charles Pence (thank you) points to an APAR: SA67752.
This means will be implementation in the future?
Yohan: what I wrote was only an example to better explain my problem.
Was not a simple COLHDG problem.
Nicola: (why Obelix?) I don't put the FORMAT keyword. But someone did
in the last ten years in only few thousands of files.

Charles R. Pence

unread,
Jun 2, 1998, 3:00:00 AM6/2/98
to

Francesco Candia wrote:
>
> fca...@tin.it (Francesco Candia) wrote:
>
> >.....I need to know with a program if a logical file will be modified
> >during a CHGPF command or not. How? There is a command or an API?.....
> Thanks to everibody for answers and few more things.
> Charles Pence (thank you) points to an APAR: SA67752.
> This means will be implementation in the future? <<SNIP>>

This APAR was closed with a 'DOC' closing code; meaning the
documentation failed to properly describe the outcome. The information
stated previously should be included in the <I assume> DB & SQL guides
<CHGPF & ALTER TABLE> to determine the outcome <ie. using DSPDBR
requests and set logic>. I believe this condition applies only to
non-SQL files, so maybe only the DB guide will be updated.?.?

0 new messages