How do you code file / field renames in ILE RPG?
Answers were Sorted based on User's Feedback
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
|Is This Answer Correct ?||19 Yes||1 No|
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 D0220OLD E DS PREFIX(D@@:3)
|Is This Answer Correct ?||0 Yes||0 No|
Answer / shivam
use remane opcode
|Is This Answer Correct ?||0 Yes||7 No|
in which journalling which attributes are necessary
can anyone explain aboutovrOVRDBF,OPNQRYF, OVRSCOPE and OPNSCOPE?
steps for debugging two rpg programs????
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
Need a sql query: retrieve all duplicate records in table?
Are all these RPG/400 Interviewed Questions being asked recently? are current?
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?
How to set on/off a group of indicators in a single statement?
How can read PF in reverse order (end to start) in CL pgm..
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?
Hi guys, anybody know How RPG/400 code can be converted to RPG IV code with a single command?
How can we override a file during runtime in RPG? Without using OVRDBF or calling a CL program