i have two pfs it contains "Status" fields in the same
name "status in both the pf's...But i used the same name
in display file...when i enter a status thru disp file it
willbe added to pf1...so i want to rename "Staus " field in
pf2 through program...............wat will do..give coding?

Answers were Sorted based on User's Feedback



i have two pfs it contains "Status" fields in the same name "status in both the pf..

Answer / s kumar

You need to use prefix keyword when you declare the file
FPF2 IF E DISK PREFIX(S)

Where 'S' is any desired name by this all fields of PF2
will start with S alphabet.

Is This Answer Correct ?    9 Yes 0 No

i have two pfs it contains "Status" fields in the same name "status in both the pf..

Answer / syam

Kumar's answer is correct, but this will prefix all fields
for pf2 file with "S".

Use this code:

D NewPf2 E DS EXTNAME(PF2)
D S_Status E EXTFLD(Status)

This is for one field

Is This Answer Correct ?    7 Yes 0 No

i have two pfs it contains "Status" fields in the same name "status in both the pf..

Answer / svankipu

Yah! Kumar's answer is correct and...
Syam's answer is aptly correct. exact.

why do u want to prefix all the fields either?
it is not proper also. & it becomes cumbersome also while
maintaining.

Thanks!

Is This Answer Correct ?    1 Yes 0 No

i have two pfs it contains "Status" fields in the same name "status in both the pf..

Answer / fhgf

HI,
YOU MEAN "SSTATUS" IN PF2
THEN..IT WILL BE EVAL SSTATUS=STATUS,WRITE PF2

Is This Answer Correct ?    1 Yes 1 No

i have two pfs it contains "Status" fields in the same name "status in both the pf..

Answer / s kumar

Absolutly!!

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More IBM AS400 AllOther Interview Questions

how does the runqry show the output?

0 Answers   IBM,


What is keyword PFILE specifies ?

1 Answers  


What are the different types of access paths maintained on the file?

1 Answers  


Difference Between Ca & Cf?

0 Answers   IBM,


Suppose we have field reference file we were any changes that corresponding Physical file then what will Happen in field reference file??

5 Answers   IBM,






What is the purpose of the "N" in the following calculation specification? C KEY CHAIN FILE N 99

1 Answers  


What is SDA used for?

7 Answers  


What is file information data structure(infds) in as400?

0 Answers  


What is the purpose of OVRATA keyword ?

1 Answers  


what is maximum number of arrays allowed in rpg?

1 Answers   IBM,


How to declare the length of emp no in the physilcal file and the mandatory length is 6 i.e. Emp No should be numeric, mandatory and fill all the 6 places

2 Answers  


What Does Lokup Does In Tables & Arrays?

0 Answers   IBM,


Categories