How to add a field to a PF and compile it without loss of data?
Answers were Sorted based on User's Feedback
First Add the fields whatever you want
then use CHGPF command
Physical file . . . . . . . . . > MyPf
Library . . . . . . . . . . . MyLib
System . . . . . . . . . . . . . *LCL
Source file . . . . . . . . . . MYSourceFile
Library . . . . . . . . . . . MyLib
Update the Physical file.No need to compile again.
| Is This Answer Correct ? | 24 Yes | 0 No |
Answer / vijay
add the field in the last and don't change the sequence of the old field then only you can used the CHGPF effectively
| Is This Answer Correct ? | 9 Yes | 2 No |
Answer / m.gupta
First add the field to existing pf for that u can do like this
2)Press 2 option for edit mode
3)Then go to the editor then u add the field in that editor what ever field u want
4)press f10 and write 'FILE' for saving file
5)Then u can write 'CHGPF'
6) Physical file . . . . FILE DEPT
Library . . . . . . MVLGUPTA2
System . . . . . . . . . . . . . SYSTEM *LCL
Source file . . . . . . SRCFILE QDDSSRC
Library . . . . . . MVLGUPTA2
7)Then click enter enter for 2 times
8)Then click UD and insert data
| Is This Answer Correct ? | 7 Yes | 1 No |
Answer / ravi
Using CHGPF and CPYF you can add fields to a PF without
loss of data.
Thanks,
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / mohan
The New field of the exisitng records would have a default
value
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / vishal
You can use ALTER TABLE in SQL to add a new field without compiling file or losing data
| Is This Answer Correct ? | 0 Yes | 2 No |
How to know the particular record in pf with out reading?
What is the purpose of the chain and setll and setgt?
CRTDTA AND CRTARA should be used along with?
Q.1 how to implement the commitment control. 2.how to control commitment control from external program.
Suppose if a physical file is having 1000 records, but i deleted 500 records from it. Here the concern is can the size of the file changes or it remains the same... kindly help me out with thorough xplanation.... Thanks in-advance...
Maximum how many fields we can create under a record format of PF?
Is it possible to create a logical file whose Physical file is not in same library?
Last statement of any rpg program is lr?
How to change the batch job to interactive job?
how to eliminate the level check error
When we create a pf and did not fill up maint parameter, then by default which access path will the system take & why?
what is the intractive job? what is the batch job ? how to change the batch job to interactive job?