I want to change the attribute of field or want to add new
field in existing PF but condition is format level
identifier should not change, is it possible?

Answers were Sorted based on User's Feedback



I want to change the attribute of field or want to add new field in existing PF but condition is f..

Answer / subbareddy

by using CHGPF command we can change the file field
attributes as wells as we can add the new field to the
existing file without loss of existing data.

Is This Answer Correct ?    31 Yes 6 No

I want to change the attribute of field or want to add new field in existing PF but condition is f..

Answer / pramod.r.nair

Whenever a file is changed (by adding or deleting a field),
Format level dentifier is also changed, even if u are using
CHGPF. So all the programs using this file needs to be
compiled again. You can avoid recompiling programs by
setting Format Level Check parameter to *NO in command
CRTPF. But this is not a good method, since it may affect
the program.

Is This Answer Correct ?    19 Yes 1 No

I want to change the attribute of field or want to add new field in existing PF but condition is f..

Answer / srikanth h

File format ID is built based on such record format
attributes as the total length of the record format, the
record format name, the number and order of fields defined,
the data type, the size of the fields, the field names, the
number of decimal positions in the field, and whether the
field allows the null value. Changes to such attributes in
a record format cause the level format ID to change.

When you append new field(s) at the end the the existing
record format, the format level ID of the file with the new
record format will change. If your existing programs have
no need to use the new appended field(s) and you do not
want to recompile the programs, then you can run the
existing programs but you must turn off the level checking
either by specifying LVLCHK(*NO) for the CHGPF or, if you
prefer to leave LVLCHK(*YES) for CHGPF, use OVRDBF with
LVLCHK(*NO) for the existing programs to still work on the
file with the new record format. If your existing programs
need to use the new field(s), you must recompile the
programs because you will have to modify the codes.

Decreasing or increasing existing fields' length also
changes file level ID and the same idea applies. But using
LVLCHK(*NO) can produce different results in different
cases. It can be unpredictable because some details are
involved. So, recompiling programs is always a good thing
to do. If you cannot afford the recompilation for some
reasons, you need to do a test in a test environment to see
the effect. The worse case scenario is to turn off the
level checking (with varying degree of possible risk) for
you to make changes to the record format.

The following changes do not change the format level ID and
thus do not need recompilation or turning off of the level
checking:
• TEXT keyword
• COLHDG keyword
• CHECK keyword
• EDTCDE keyword
• EDTWRD keyword
• REF keyword
• REFFLD keyword
• CMP, RANGE, and VALUES keywords
• TRNTBL keyword
• REFSHIFT keyword
• DFT keyword
• CCSID keyword
• Join specifications and join keywords
• Key fields
• Access path keywords
• Select/omit fields

Is This Answer Correct ?    11 Yes 0 No

I want to change the attribute of field or want to add new field in existing PF but condition is f..

Answer / jimbob

It depends on what attribute you are changing. If you change
the text, for example, then there is no change to the format
level id. But if you change the field's length or decimal
places, for example, then the format level id is definitely
changed.

Is This Answer Correct ?    5 Yes 0 No

I want to change the attribute of field or want to add new field in existing PF but condition is f..

Answer / chandrababu

I have file EMP with Record level identifier is 20A2E063B4AD5 and I have added one new field to that file.
Below are different level identifiers with diff parm LVLCHK of CHGPF.


1)3C540B0837B35 ---> LVLCHK(*YES)
2)3C54AB58D8549 ---> LVLCHK(*SAME)
3)3C554BA978F5D ---> LVLCHK(*NO)

So we cant get the same level identifier if changes any attribute or adding the new fields.

Thanks,
Chandra

Is This Answer Correct ?    1 Yes 0 No

I want to change the attribute of field or want to add new field in existing PF but condition is f..

Answer / dinesh

All the above answers are not given correct solution, so CHGPF is it to avoid record loss only not for avoiding the recompilation the programs....any one can give exact answer for this questions

Is This Answer Correct ?    0 Yes 1 No

I want to change the attribute of field or want to add new field in existing PF but condition is f..

Answer / suji

When ever we change attributes of a field ,File Level
identifier will change.NO way to stop that.I agree with sonu

Is This Answer Correct ?    1 Yes 5 No

I want to change the attribute of field or want to add new field in existing PF but condition is f..

Answer / suj

After changing the attributes of a record format, instead
of compiling, use CHGPF take F4 and give Record format
level check (LVLCHK) as *SAME, this doesn't change the
level check value.

Is This Answer Correct ?    3 Yes 7 No

I want to change the attribute of field or want to add new field in existing PF but condition is f..

Answer / sonu

No. Whenever a format is changed or touched the format
level identifier is always changed.

Is This Answer Correct ?    1 Yes 6 No

Post New Answer

More DB400 Interview Questions

Why we create the Physical File Member?

5 Answers  


WHAT IS THE DIFFERENCE BETWEEN 'COLHDG' AND 'ALIAS'?

5 Answers   Accenture,


A pf containing 100 records... my query is how to display from 11th record in the pf?

3 Answers  


what is the purpus of the chain and setll and setgt ?

2 Answers   Four soft,


How many libraries can be there in a library list?

2 Answers  






what is the intractive job? what is the batch job ? how to change the batch job to interactive job?

2 Answers   Four soft,


When we create a pf and did not fill up maint parameter, then by default which access path will the system take & why?

0 Answers  


hi iam very new to as400. i had created one physical file can any one tell command to enter data in to that

9 Answers   Encore,


How to insert more than one record to a pf at a time?(Bulk insert to a pf)

9 Answers  


what is multiple member pf

1 Answers   Active Brains,


Hi, Please give the answer to this question? I have Phisical file with 100 records,there is no any duplicate records in this pf.Based on this pf one Logical file i have used.But this lf is viewing only 80 records only of that pf?What is the reason for this?Please give me answer?

4 Answers   IBM,


How to know the perticular record in pf with out reading?

2 Answers   Cap Gemini,


Categories