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 is the purpose of PUTOVR keyword?

2 Answers  


what is post opcode do

1 Answers   CTS,


How can i keyed a flat file in RPGLE

5 Answers   IBM, Wipro,


what are the key words you must use when using a subfile?

0 Answers   IBM,


2. Which of the following statement(s) explains the difference(s) between the /INCLUDE and ICOPY directives? a.) No difference, they function the same b.) ACOPY cannot be used as a conditional directive c.) IINCLUDE files cannot contain embedded SQL d.) Nesting /TNCLUDE directives is not allowed

2 Answers   IBM,






Q:HI friends accually ihave one problem plesase let me know the alternate code of this code. Related field description of code: Add a field, CALvsPRD, "Calendar Day Starts Before/After Production Day" to the parameter set WRKORDER which accepts values 'A' or 'B' o B = Calendar Day Starts Before Production Day o A = Calendar Day Starts After Production Day o Any other value indicates the production and calendar dates are always the same. code: Automatic Execution Of *INZSR Subroutine /Z01 * retrieves WRKORDER field values. /Z01 * Calculate default Production Date and return it to caller. /Z01 * Production date defaults to system date /Z01 C Eval P@Pdate = %DATE() /Z01 * unless Calendar date starts Before PDN(production) date and /Z01 * system time is before PDN Start Time then /Z01 * PDN date is yesterday. /Z01 C If W@CALvsPRD = 'B' and /Z01 C %TIME() < %TIME (W@Strtime) /Z01 C Eval P@Pdate -= %Day(1) /Z01 * unless Calendar date starts After PDN date and /Z01 * system time is *GE PDN(production) Start Time then /Z01 * PDN date is tomorrow. /Z01 C ElseIf W@CALvsPRD = 'A' and W@Strtime > *Zero and /Z01 C %TIME() >= %TIME (W@STrtime) /Z01 C Eval P@Pdate += %Day(1) /Z01 C EndIf /Z01 C Eval *InLr = *On

0 Answers   IBM,


What is the diff bw PF/LF Name and their Record format name? what is restriction in record format then file name?

0 Answers   Wipro,


Hi guys, anybody know How RPG/400 code can be converted to RPG IV code with a single command?

1 Answers  


Hi, Can any body tell me ur experience on this questions? Questions: 1.what is the use of SFLRCDNBR other than subfile page display? 2.Which of the following operation cannot be used in conjuction with a file coded as device type disk?

1 Answers  


What is SFLNXTCHG keyword why it has used and where? Briefly explain with Example.

2 Answers   IBM,


I know chain keyword retreive records randomly but how chain keyword exactly works internally????

4 Answers  


how do I do concatenation in rpg iv, like I do in cl?

1 Answers   IBM,


Categories