Is it possible to add an keyfield or field to an Physical file without changing its file identifier.

Example : - Say I have an existing physical file which is being used in 5 programs. Now I want to add an additional Keyfield or an field to it and I don't want to recompile the programs.

Answers were Sorted based on User's Feedback



Is it possible to add an keyfield or field to an Physical file without changing its file identifier...

Answer / vivek dwivedi

You can add field in file using sql. Alter table as below..

ALTER TABLE File_Name ADD COLUMN Field_Name SMALLINT NOT NULL DEFAULT 0

Is This Answer Correct ?    0 Yes 0 No

Is it possible to add an keyfield or field to an Physical file without changing its file identifier...

Answer / prabhu

Yes, After adding the key field try CHGPF.

I believe adding key fields and CHGPF will not change the record identifier so here no need to recompile your programs.

Is This Answer Correct ?    1 Yes 5 No

Post New Answer

More IBM AS400 AllOther Interview Questions

how do you detect unused spool storage?

2 Answers  


In Which Specs Arrays, Tables & Constants Are Defined?

0 Answers   IBM,


How to write a password mask program in as400? like the password which i type should be displayed as '*****' r ###### which the user wishes to dispaly if u could help me with url r the solution in written code this will help me

21 Answers   Accenture, SNS,


how can database records be read without lock ?

1 Answers   IBM,


What is journaling & Commitment Control?

1 Answers  






In RPG How to read a records from a file without using read opcodes?

0 Answers  


What is the use of E specification in RPG?

1 Answers  


What is a Device file?

1 Answers  


Hi, can you plz tell me ...syntax for GET command in FTP & SFTP is same or different???

3 Answers  


what are the different types of data areas?

1 Answers   IBM,


What is logical file in as400? What are the types of logical file?

1 Answers  


which cl command can be used at program execution to redirect the file named in an rpg program?

0 Answers   IBM,


Categories