Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


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 ?    30 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 / 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 ?    17 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

What is the primary file?

0 Answers  


how to know total no of records in pf with out using sql??????

3 Answers  


can any one pls tell me some differences between a LF and command OPNQRYF?

3 Answers   Accenture, Cognizant, eFunds,


What is the batch job?

0 Answers  


how to eliminate the level check error

2 Answers   TCS,






Is Constent can be define as a key field?

3 Answers  


How to retrieve a physical file after deleting that ? what is keyword used for that....??

6 Answers  


Suppose if a physical file is having 1000 records, but i deleted 500 records from it. Here the concern is can the size of the file changes or it remains the same... kindly help me out with thorough xplanation.... Thanks in-advance...

6 Answers   ABC, TCS,


YOU CAN DELETE THE RECORD SPACE PERMENANTLY IN PHYSICALFILE THROUGH CL?

4 Answers  


1. How can I create a LF using crtlf command based on a particular member in a multimember PF? Where I have to specify the member name? 2. How to differentiate between the types of join from a Join logical file DDS. Is it possible to have different types of Join Logical files? 3.Any performance difference between Opnqrf and Embedded SQL? When I should prefer Opnqryf and when SQL? 4. I know access path is the path chosen by the program to retrieve data. It can be of keyed access path or arrival sequence. *IMMED- *IMMED description says access path is updated each time record is added or deleted from a member. - What is updating here? *REBLD - The access path is completely rebuilt each time a file member is opened. The access path is maintained until the member is closed, then the access path is deleted. - I am not able to understand this completely. Could anyone explain these more clearly? 5.What is the purpose of using activation group. I know it is a resource allocator, but other than this any other benefits of using an activation group?

2 Answers   IBM,


I have physical 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?

0 Answers  


Which keyword is used both in subfile and subfile control record format of a DSPF?

8 Answers  


Categories