How to add a field to a PF and compile it without loss of data?

Answers were Sorted based on User's Feedback



How to add a field to a PF and compile it without loss of data?..

Answer / s.kumar

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

How to add a field to a PF and compile it without loss of data?..

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

How to add a field to a PF and compile it without loss of data?..

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

How to add a field to a PF and compile it without loss of data?..

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

How to add a field to a PF and compile it without loss of data?..

Answer / mohan

The New field of the exisitng records would have a default
value

Is This Answer Correct ?    1 Yes 1 No

How to add a field to a PF and compile it without loss of data?..

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 1 No

How to add a field to a PF and compile it without loss of data?..

Answer / mahalakshmi

ovrdbf command wuth out losing of data

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More DB400 Interview 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?

0 Answers  


Why we create the Physical File Member?

5 Answers  


When we use any keyword like FIFO,LIFO, at file level but whenever we check by runqry we couldn't find answer in FIFO,LIFO,FCFO etc so how we check the answer.

2 Answers  


how to know total no of records in pf with out using sql??????

3 Answers  


how to update physical file using logucal file with example

1 Answers   Wipro,






how to restrict upon adding the data for field reference file in DB400

1 Answers  


What is the primary file?

0 Answers  


what is the difference between adding keys & constraints into a phisical file

6 Answers   HSBC,


How to index LF by relative record no (RRN)

0 Answers  


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

0 Answers  


CRTDTA AND CRTARA should be used along with?

2 Answers  


I have a PF with out any data but the dependent LF is having data?

1 Answers   HCL,


Categories