Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


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 ?    19 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

in which journalling which attributes are necessary

2 Answers   CTS,


can anyone explain aboutovrOVRDBF,OPNQRYF, OVRSCOPE and OPNSCOPE?

2 Answers   TCS,


steps for debugging two rpg programs????

4 Answers  


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,


Need a sql query: retrieve all duplicate records in table?

1 Answers  






Are all these RPG/400 Interviewed Questions being asked recently? are current?

1 Answers  


1.Can any body share me about thease opcodes with example please.Im new for AS/400.Could u please tell me in real senario? 1.TESTN, 2.EVAL 3.EVALR, TIME, 4.MONITOR 5. ENDMON 6.ON-ERROR 7.COMMIT ROLLBACK?

1 Answers   CSC,


How to set on/off a group of indicators in a single statement?

3 Answers  


How can read PF in reverse order (end to start) in CL pgm..

8 Answers   TCS,


Whether a module can consists of many procedures or it can consist of subprocedures having a main procedure?If it is possible that it can contain many individual procedures than can we have different name for complete module and how do we call this module in main modul?

3 Answers   Steria,


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

1 Answers  


How can we override a file during runtime in RPG? Without using OVRDBF or calling a CL program

1 Answers   UST,






Categories