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.

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Service Program : S1 Modules in S1 : M1 M1 having two procedures : ADD, SUB Current Binder Language STRPGMEXP PGMLVL(*CURRENT) EXPORT SYMBOL("ADD") EXPORT SYMBOL("SUB") ENDPGMEXP Doubt: I need to add one new Module to the Service Program M2 having one procedure ‘MULT’ How to add this new module to the service program S1 ? If I need to recreate the service program again, Do I need to mention the Module M1 again while recreating along with new Module M2? There is no Binding Directory. Binder language structure will be like this STRPGMEXP PGMLVL(*CURRENT) EXPORT SYMBOL("ADD") EXPORT SYMBOL("SUB") EXPORT SYMBOL("MULT") ENDPGMEXP STRPGMEXP PGMLVL(*PREVIOUS) EXPORT SYMBOL("ADD") EXPORT SYMBOL("SUB") ENDPGMEXP

2149


what is the purpose of ovrdta (override data) keyword?

1438


how do you use commitment control in rpg program ?

1664


what are the important factors in error message subfile ?

773


what is the maximum number of subroutines allowed in rpg?

1414


Difference Between Source Physical File & Physical File?

876


what is the maximum number of parameters allowed in rpg?

1392


I need to insert a record in a file using STRSQL containing the some field values same as an already existing record in that file.I know to smple insert mentioning those values one by one.But is there any another query can be prepared for the same .Please share the query if known to you. Thanks in advance.

2512


writing an sql statement from selecting records from two files using single statement and nested select statement.

931


how do you know that records are locked?

1572


what are various techniques to pass parameters from one program to another?

1459


what is subfile?

1244


What Is The Object Type Of Pf, Lf, Printer File & Display File?

953


when would you use or not use this approach?

1222


which type of object is used in db2/400?

843