how to change the length of the field in a physicalfile?
Answer Posted / abhishek bajpai
Hi All,
Just to elaborate on the above answers..offcourse CHGPF is
correct and we can just press enter on this command and it
modifies the object based on the current DDS keeping the
data intact. But there are a couple of things to be taken
care of in this:
1.> If we are increasing the field lenghts then there is no
problem at all and chgpf runs absolutely fine.
2.> If we are decreasing the field length, then in case of
character field it will give warning as the existing
records might be truncated because of the shortened length.
But in case of numeric field the caommand will fail because
OS400 cannot truncate the existing numeric data and the
command blows up.
3.> If suppose the command is successfully run and the
field length is changed in the PF then there r chances that
the LF wont reflect the change. If in LF Pfile is mentioned
and no fields (that means the whole record format is copied
from PF) then it will reflect the new length. But in case
you have mentioned certain fields in LF then it will keep
on showing the old lenght inspite of the fact that in PF
the lenght is changed. This is because here the field
attributes are copied to LF from the PF when it is compiled
and it keeps on showing that length only.
Thanks
Abhishek Bajpai
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
what is the necessary keyword needed to scroll subfile records?
1. What is bound-by-call and bound-by-reference? 2. Where and why is *Nomain used? 3. What are the difficulties faced by programmers when using service programs? 4. Explain the different ways of parsing and compiling XML in iSeries.
what is the procedure and explain about real time scenario.
How to create a login screen using a command instead of display file.... intention is to get a password field on a command..... how do you achieve this...
if there is a module object , how to find the program object for this module object.Assume the module object name and program object name is not same.
what is a rpg?
We have job which is running as batch. It takes atleast 06 hours to complete tht job. But I wanna do tht job with in 3 hours?
How would display prime numbers using CL program?
how do I play {insert rpg system here}?
How to select highest score of each subject or how to select highest income of every month?
How do u design a physical file, when you have 2 Unique fields like for eg in A student file student ID and student examination no both are unique
What is the difference between copybooks and subprocedures in as400?
Set on command is used for closed all opened files , initialize var and release resource , return cmd is used for return to calling program but my req. Is dnt close opened files and resource must released while doing transactions , how can i do this...?
what is data area and how it is used in rpg program ?
write an RPG program to calculate the marks of 5 students (A,B, C, D, E)in 3 different subjects (eng, math, sci) an display on the screen