How to read data from Nth member of a physical file containing
some X number of members in it?
"Provided member names are unknown"
Answers were Sorted based on User's Feedback
Answer / sandey243
Way:1
We can execute DSPFD with *OUTFILE option, using QCMDEXC in
RPGLE program then we can read the outfile to get the name
of the file, then after we can read the file.
Way2:
Make the file to have all members available i.e.,
EXTMBR(*ALL). Then move *HIVAL to RRN and do a SETGT on the
file... this will take the control to the bottom of the
first member...then READ will give you first record of the
Second member...... This way we can go to the member....
(This method I tried and succeeded)...
Is This Answer Correct ? | 10 Yes | 1 No |
Answer / zavith ahamed
to declare f spec extmbr(*all) to read the data from file
Is This Answer Correct ? | 0 Yes | 1 No |
Answer / sakshi bansal
I tthink we can use OVRDBF command in Cl and call RPG through it.
Is This Answer Correct ? | 0 Yes | 5 No |
How to write record if no field or the field are different in physical file in rpgle ?
how do I do concatenation in rpg iv, like I do in cl?
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.
give an eg of ACQ-(ACQUIRE),BIT OFF,BIT ON,DEALLOC,DUMP,FEOD,FORCE,MHHZO,MHLZO,MHLLZO,MLHZO,REL,RESET,TESTZ,TESTB,TESTN----GIVE SMALL EXAMPLE TO THE OPCODES...TO UNDERSTAND FUNCTIONING...........
in a cl pgm records are copied to a file in qtemp a pgm is called to delete records from the file in qtemp no of records in file in library qtemp is checked wat shud be the count of records let say it was 10 initially endpgm
Interviewer asked me write down DDS for load all subfile .can anybody write dds
What is a record lock error?
This is my Physical file 'EMPS' existing in library "TAMIL1" and its record format is 'EMPRCD" a)its source is R EMPRCD ENO 4 0 ENAME 10 EADD 10 b)The records present in EMPS are as follows ENO ENAME EADD 0001 tamil coimbatore 0002 kumar bangalore 0003 sunder bangalore 0004 arunkumar chennai 0005 pandi hyderabad 0006 santhosh hyderabad 0007 sasi salem 0008 kalai chennai 0009 suresh hyderabad 0010 vijay bangalore 0011 Arul chennai 0012 velu chennai 0013 khan bangalore 0014 praba chennai 0015 praba.p coimbatore 0016 anand ooty 0017 raja erode 0018 sankar erode 0019 vadivel namakkal 0020 anbu chennai 0021 Ajith mumabi c)now i want to select the 'ENAME' field records starting with 'S' for that i have created a RPG program its source code is PGM DCLF FILE(TAMIL1/EMPS) DCL VAR(&MYENO) TYPE(*CHAR) LEN(4) OVRDBF FILE(EMPS) SHARE(*YES) OPNQRYF FILE((TAMIL1/EMPS)) QRYSLT('ENAME *EQ %WLDCRD("S *")') READ: RCVF RCDFMT(EMPRCD) MONMSG MSGID(CPF0864) EXEC(GOTO CMDLBL(END)) CHGVAR VAR(&MYENO) VALUE(&ENO) SNDUSRMSG MSG(&MYENO) SNDUSRMSG MSG(&ENAME) SNDUSRMSG MSG(&EADD) GOTO READ END: CLOF OPNID(EMPS) DLTOVR FILE(EMPS) ENDPGM Is this coding correct sir,the program gets compiled,and if i call it it says query running but records are not displayed.please help me out
How do you code file / field renames in ILE RPG?
difference between 1:%found and %equal built function in detail with example .
What will happen if we r using seton lr after return or vice versa.
How do you do indexing in a physical file?