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?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to retrieve a physical file after deleting that?

584


I have a pf, it contains 5 members, how to access particular member data from logical file?

527


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?

645


What is the use of member in pf?

537


How to change the batch job to interactive job?

572






What is FORMAT keyword and its use?

205


In a CL Program after executing a SQL SP how to receive a Output value from the SP. Just to make it clear I am sending 2 input and 1 output parameter to the SQL Stored Procedure. Now while receiving it output parm it is failing.

2130


How to index LF by relative record no (RRN)

2832


What is the interactive job?

576


Suppose I have a pf,it contains 5 members,how to access particular member data from logical file ?and what is the use of member in pf?

632


What is open data path?

577


What is the primary file?

584


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

588


Suppose I have a pf, it contains 5 members, how to access particular member data from logical file? What is the use of member in pf?

622


How to find the list of source physical files in a library?

618