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 |
RPG/400 number of Records present in a physical file using file information data structure FPF001 IP E DISK F KINFDS INFDS1 IINFDS1 DS I *RECORD RECORD Is this coding correct sir,i have given I P E that is I- input,P-primary file,E-externally described. Primary to use RPG logic cycle,is this the correct method because we have to find number of records present using file information data structure in RPG/400 without doing any input/output operations on the file and also without using DSPFD,SQL. If the above coding is correct means,when i compile the program it gets compiled,but if i call the program it does not return anything,i need number of records,please complete the coding sir.
i would like to know under what circumstance the object will get locked on AS400.
what is data area and how it is used in rpg program ?
Can AnyOne tell me how to read join logical file in rpg from starting to end?
In how many ways a session/device error occurs,,, and what is the remedy for it?
i)What is the command to lock a file in a program ii)2. Can you get a level check error in a CL program
How can we read a particular record from the database file which is not having DDS (Flat File). For example, there are 100 records in the flat file. How can we retrive 15th record in RPG/400 program (Without using CL)
we hav job which is running as batch. it takes atleast 06hours to complete tht job. bu i wana do tht job with in 3hours.........? so plz post ur answers
can anyone say,what is the use of operation extended H/N/P?
suppose if we want to update the data in cl what we will do?
Hello, I want to extend a length of field in my Display file(Subfile). Please suggest the possible steps. Thanks
1.I have a Physical file with 100 records, No duplicates exists, all are Unique,But while i am running Runqry utility i am getting only 80 records..What could be the reason?