Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


how to change the length of the field in a physicalfile?

Answers were Sorted based on User's Feedback



how to change the length of the field in a physicalfile?..

Answer / shanky

CHGPF Command:-

You need to Change DDS of Physical file for Changing Fileds
Length. and after det u need to complie it but if you
complie it then u will loose Existing Data of ur File.

So By Using CHGPF Command u can Keep ur Existing Data with
Compilation Of changed fields(DDS).

Is This Answer Correct ?    13 Yes 1 No

how to change the length of the field in a physicalfile?..

Answer / vani

i think by using the CHGPF it is possible.if anybody tell
me is it right or wrong

Is This Answer Correct ?    18 Yes 9 No

how to change the length of the field in a physicalfile?..

Answer / gautam

As per my understanding,we can not change length of a field
in a physical file using command CHGPF.Using this command
we can change number of records and so on.

If we want to change length of a field then we have to
change its source where we previously defined the size of
the field and then requires a compilation.After compiling it
we delete all logicals based on this physical file then
file is re-build in respective file groups from where
prorams use records.

Please let me know if there is any issues!

Is This Answer Correct ?    13 Yes 5 No

how to change the length of the field in a physicalfile?..

Answer / sachin

By Using CHGPF, We can Change Length add New field or
change field Attributes in PF

Is This Answer Correct ?    8 Yes 3 No

how to change the length of the field in a physicalfile?..

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

how to change the length of the field in a physicalfile?..

Answer / raja

By using CHGPF we can change the field length.

Is This Answer Correct ?    6 Yes 4 No

how to change the length of the field in a physicalfile?..

Answer / ramaraju

By using CHGPF comaand we can change the pf attribute size.
And another way is

copy the physical file into another dummy file(for that
use Cpyf)
and change the physical file field length ,compile it
Then again copy the data from dummy file to original file

Is This Answer Correct ?    4 Yes 4 No

how to change the length of the field in a physicalfile?..

Answer / abhishek kumar

I agree that we can do this using the command CHGPF but
whether any one can tell which paramter we need to change
in CHGPF?

Is This Answer Correct ?    0 Yes 0 No

how to change the length of the field in a physicalfile?..

Answer / manu som

By using CHGPF comaand we can change the pf attribute size.
And another way is

copy the physical file into another dummy file(for that
use Cpyf)
and change the physical file field length ,compile it
Then again copy the data from dummy file to original file

Is This Answer Correct ?    2 Yes 4 No

how to change the length of the field in a physicalfile?..

Answer / swapnil sanghai

Hi All,
just wanted to check if it works for PF ( Flat Physiccal
File ). I do not see option for changing the length of
file. Can you please correct me if im wrong .

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More RPG400 Interview Questions

How to create a key field for a logical file inside RPG?

4 Answers   HSBC,


what is meant by record lock.how records are locked.what is the purpose of record lock.if records are locked what happens.how to find out which record is locked.

4 Answers   HCL,


i have a file with the values 10, 20, 30, 40, if am setll with the value 25 then readp, so what it will return?

6 Answers   Mind Tree,


One of the job in subsystem is in Running status,expected time to complete this job is 2 minutes. But from last 5 -10 minutes this job is still in running status....What are the possible reasons...and What are the actions i need to perform to check this...?

4 Answers  


I have two sessions S1 & S2 under this 3 jobs(say j1,j2,j3 under session S1) And 2 jobs(Say j4, j5 Under session S2)is running. How many QTEMP & how many LDA will create for the same.

9 Answers   IBM,


When a object will be locked & when a record will be locked? Plz explain.

2 Answers  


I know whole thing ab't Arrays related to declaration..can anyone tell me what exactly use of array or anyone faced a situation where he found use of array must....

1 Answers  


How can you determine the number of characters in a variable?

3 Answers  


what is data area and how it is used in rpg program ?

0 Answers   IBM,


How to change the name of physical members Dynamically?

1 Answers  


How can we search particular records from the database file in RPG. For example, there are 100 records in the file.i need to retrieve all the records matching/equal to the particular 'NAME' field. How can we do the above using SEARCH criteria other than using the IF cond?

4 Answers   CTS,


wat is the difference between dataarea and data queue?

5 Answers   Airtel, Four soft, Shahi Exports,


Categories