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
way
| Is This Answer Correct ? | 20 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 EXTNAME(CZGD02H0:CZTD02H2)
D D0220OLD E DS PREFIX(D@@:3)
D EXTNAME(CZGD02H0:CZTD02H2)
| Is This Answer Correct ? | 0 Yes | 0 No |
1.Coding in cl to send an message? 2..What is turnover and use? What are the different levels?
3 members in databasefile .how to read records from all the members??
what is file information data structure?
How to search particular records from the database file in rpg?
if there is pf in two libraries and there is a logical file based on the PF, how to find the pf on which the pf is based.
WHERE DO WE USE COMIT KEYWORD IN AN RPG PROGRAM? YOU MADE SOME CHANGES TO DATABASE BUT YOU DON'T WANT TO SAVE THOSE CHANGES NOW? HOW DO YOU HANDLE THIS ONE?
1.What is referential Integrity? 2.What is Foreign Key? 3.What is Transfer Control? 4.What is Free format?
How can you delete a record from a file in RPG without using DELETE oppcode?
Suppose in CL we reach at end of file and again we have to reach from 1 record
1.The questions have given an array declaration and move operation then this statement is correct or not?
Q:Hi all,i want accurate answer with code using in built functions.please sent me code as soon as posible. I have program nmed PGM1 which '' RETRIEVE Current production date''should correctly default the production date for the user who is issuing raw materials to the manufacturing.The production date can be different from the celendra date. However, the program does not make the correct adjustment for all manufacturing plants. there is a parameter which determines the production start time e.g. 07:00 if the system time precedes this,the program subtracts one from the celendra day.This work fine when the celendar day starts after production day as it does in England,the system should be adding one to the celendar day during the overlap. unfortunately the program was desined to assumed the celendar day always starts before the production day. Change required in the program: Change the PROGRAM PGM1 to use the new parrameter to decide whether to add or subtract 1 from the celendar day when determining the production date.
What is the diff bw PF/LF Name and their Record format name? what is restriction in record format then file name?