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 to reverse a string using RPG?

0 Answers  


I/o error detected,Record Out of sequence,Permanent I/o error occured....I mean give one eg for these errors...i understand only,update/delete operation without prior read oprn..give details of remaining

1 Answers   CTS,


how can we view the entire objects and its types in a pgm?

7 Answers   Mind Tree,


i have recently moved to hyd. i would like to know which is the best institue to learn AS400. are there any in ameerpet? thanks.

4 Answers  


What is LDA?

1 Answers  






Difference Between Interactive & Batch Job?

0 Answers   IBM,


how to handle job errors in as400 what is the command and where can we find out whether the job has any errors

2 Answers   Virtusa,


Q1. How to use signature in service program and ILE.? Q2.what is use of signature and binder language and what is the relation between them?

2 Answers   CTS,


how can a message from a message file appear as a constant on the screen?

1 Answers   IBM,


CAN WE INSERT FIELD IN PHYSICAL FILE BY USING OPNQRYF?

4 Answers  


what is sflinz and sflrna?

0 Answers   IBM,


define the purpose of the *cat function?

1 Answers   IBM,


Categories