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

what are the array operations?

1 Answers   IBM,


Can we used ovrdbf command after the opnqry file if yes then What will be out put of your program?

4 Answers   IBM,


In single page subfile,if I select the mutiple options in 1 page and without pressing enter,I press rollup key (pagedown).In such case how I can handle it in rpg becasue in single page we have to handle it in pgm. It would be helpful if any one answer with coding

4 Answers   Infinite Computer Solutions,


How to declare the pull button in AS/400..

0 Answers  


how can we know running job is batch or intractive ? i need all the possibilites.........plz help me

3 Answers   HSBC, IBM,


how do u find whether a record is locked or not??

4 Answers   CTS,


why subproc not run in dftactgrp?????/plz explain

2 Answers   CSC,


Anyone help me for the below question:- If problem/error occur in *PSSR subroutine,how should I handel it in RPG program.

1 Answers  


How to find d key field of a pf that doesn’t have source physical file?

2 Answers  


What is the purpose of record level identifier?

0 Answers  


What is file identifier where we can use?

0 Answers  


I have one cl program which calls two rpg programs named a & b. I am loading a run time array in Pgm A and the control comes back to cl pgm. i call pgmb and I want to read the runtime array in pgmb which was loaded in pgma. How it can be acheived. I should not use any intermediate file or dataarea to store the loaded values.

2 Answers  


Categories