How do you code file / field renames in ILE RPG?

Answers were Sorted based on User's Feedback



How do you code file / field renames in ILE RPG?..

Answer / kcsyam

Define a Data Structure in ILE RPG.

D New_File E DS EXTNAME(Old_File)
D New_Field1 E EXTFLD(Old_Fld1)
D New_Field2 E EXTFLD(Old_Fld2)

You can use PREFIX keyword instead of EXTFLD on different
way

Is This Answer Correct ?    20 Yes 1 No

How do you code file / field renames in ILE RPG?..

Answer / ankit10

To rename a field we use prefix keyword.

Is This Answer Correct ?    1 Yes 0 No

How do you code file / field renames in ILE RPG?..

Answer / ravikumar895

Hi Ankit and shivam,

if two files having same record formats, using RENAME keyword we can rename the one record format...

Ffilename1 UF A E K Disk
F Rename(original record format name1:new record format1)
Ffilename2 UF A E K Disk
F Rename(original record format name1:new record format2)


Answer for Harshad to his question :
--------------------------------------------

D D0220NEW E DS PREFIX(D21:3)
D EXTNAME(CZGD02H0:CZTD02H2)
D D0220OLD E DS PREFIX(D@@:3)
D EXTNAME(CZGD02H0:CZTD02H2)

Is This Answer Correct ?    0 Yes 0 No

How do you code file / field renames in ILE RPG?..

Answer / shivam

use remane opcode

Is This Answer Correct ?    0 Yes 7 No

Post New Answer

More RPG400 Interview Questions

How to index LF by relative record no (RRN)

1 Answers  


what is the use of sflnxtchg?

0 Answers   IBM,


I have a RPG program of 100 Lines and first line is to SETON indicator LR. Will the program execute rest of the 99 Lines?

6 Answers  


how to display all the members records in a physical file without using ovrdbf?

9 Answers  


How to declare the dynamic(run time) array in rpgle? can you please give example

2 Answers   Polaris,






Given the following code, what is the value of RESULT? DName+++++++++++ETDsFrom+++To/L+++IDc.Keywords+++++++++++++ D RESULT S 5 0 C EVAL RESULT = (2 + 3 * 2) ** 2 / 2

2 Answers  


Let?s consider a variable X of length 20. Move value ?ABC? to it.How to determine how many characters does X have?

1 Answers  


Hi Viewers can any body explain me how to update and ahange the already existed data in physical file using subfile ? please explain me with the code if possible?

1 Answers  


i want to perform uniqness on db file bt my db file nt hving key by useing rpgle.

3 Answers   HSBC,


How can we receive values from a called procedure in CL?

1 Answers   IBM, NTT Data,


how do I preserve and clean the array?

0 Answers   IBM,


In a particular program one file is used where override command is applied to a file, now this program calls another program where we want to use the same file but without override.How it can be done?

6 Answers   Hexaware,


Categories