40 pts.
 CHGPF error in Iseries v5r4
The CHGPF command is giving error when used to change the CCSID from 37 to 285 in a pf in iseriee V5R4. The files are empty but it is showing the error as " Error occured during the update of physical file PFILEA in library LIBA using source file located in library LIBINST.."



Software/Hardware used:
Iseries db2/400 v5r4
ASKED: January 5, 2010  7:09 AM
UPDATED: January 6, 2010  7:31 PM

Answer Wiki:
EIT,is right! Delete the exxisting object of FILEA and recreated it using new CCSID.
Last Wiki Answer Submitted:  January 6, 2010  10:19 am  by  Samule400   160 pts.
All Answer Wiki Contributors:  Samule400   160 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

If the files are empty, can you delete it and recreate it from the source instead of doing a CHGPF?

 605 pts.

 

What is the error message identifier? The text doesn’t help us much since many errors may result in similar (or identical) text. Usually, such a message indicates that there are other messages that pin-point the specific error. Knowing the message identifier will help us determine what else to look for.

Tom

 108,055 pts.

 

Please find the job log below for the above error.

Message . . . . : Change to field FLDA may result in data loss.
Cause . . . . . : A change to field FLDA in file FILEA in library LIBA may
cause data loss. The reason code is 8. The reason codes and their meanings
are as follows: 01 – The field will be dropped. 02 – The new length is
shorter than the current length. 03 – The new precision is shorter than the
current precision. 04 – The new scale is shorter than the current scale. 05
– The new data type is floating point and the current data type is not
floating point with the same length. 06 – The current data type is floating
point and the new data type is not floating point with the same length. 07 –
The new attribute is not nullable and the current attribute is nullable. 08
– The new CCSID is different from the current CCSID. 09 – The new data type
is date, time, or timestamp and the current data type is character,
DBCS-open, or DBCS-either. 10 – The new data type is character, DBCS-either,
or DBCS-only and the current data type is DBCS-open, or the new data type is
character or DBCS-only and the current data type is DBCS-either. Recovery .
. . : If the changes to field AIER are not desired, change the specified
attributes of field AIER and try the function again.

CPF7304 Escape 40 File FILEA in LIBA not changed.

Thanks,

 40 pts.

 

It is a part of batch job which runs daily to change all the files as per the requirement. Compiling physical files will lead to compilation of the programs also which is not feasible.

Thsnks,

 40 pts.

 

this would be a last resort … recompile the file with level check *NO …

 405 pts.

 

recompile the file with level check *NO …

Although this can be a valid option, I would not suggest it to those who are unfamiliar with the basics of what it means. There are serious risks that need to be considered and decided. Without the knowledge foundation, LVLCHK(*NO) needs to be avoided by a long distance.

As for the current error:

Message . . . . : Change to field FLDA may result in data loss.

This is what we would need the message identifier for.

However, most likely, the message ID is CPD32CC. If this is the only diagnostic message and the condition is acceptable, then the CHGPF command might be run with GENLVL(21) as an additional parameter. I think that this particular warning is a severity 20, but I’d need to see an actual compiler listing example to be sure.

When severity 20 diagnostics are understood and acceptable, they can usually be allowed. In this specific case, it seems to be the intent to accept this potential data loss. I suspect that no actual data loss will occur.
There is more that should be covered, but probably in a separate question. I’m concerned about the business process behind this comment:

It is a part of batch job which runs daily to change all the files as per the requirement.

I’d recommend that the whole requirement be posted in a question for more discussion. It seems odd to say the least.

Tom

 108,055 pts.