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

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?

622


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

610


What is the batch job?

564


How to index LF by relative record no (RRN)

2825


There is one string as A B C and wanted to display string as Shri A Shri B Shri C, how we can do this in sql? If we have around 100 values in string like this, each value should be displayed with initials as Shri.

720






Where the QTEMP library will get created? if the the answer is QSYS, then howcome more than one job can create same library name(QTEMP) in QSYS? what is the uniqueness of QTEMP? For example, run the below command in different workstation WRKOBJ QSYS/QTEMP And take 8 in the option to check the description. both will have different info. so where(which LIB) exactly the QTEMP is stored?

7408


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

581


What is the interactive job? What is the batch job? How to change the batch job to interactive job?

620


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

560


What is FORMAT keyword and its use?

189


How to update physical file using logical file with example?

574


What is the interactive job?

570


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?

630


Can we concatenate fields in physical file? If yes how can we do?

580


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.

2117