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.
Answer / prince
FAAPPOLM IP E K DISK INFDS
(FILE)
DFILE
DS
DREC 156 159I
0
C DSPLY
REC
C EVAL *INLR = *ON
I have declared file information data structure in position
156 to 159 it will hold the number of records in the
file.
| Is This Answer Correct ? | 7 Yes | 2 No |
1) How to declare a file? 2) How to define a display file? 3) How to monitor error messages in RPG? 4) How to find the attributes for subfiles? and what is the DDS for subfiles?
i would like to know under what circumstance the object will get locked on AS400.
Anybody can explain the difference between SFLCLR & SFLINZ?
A rpg or clp command to find if the file field is defined as a character or numeric field.
in which journalling which attributes are necessary??/
wat is the difference between dataarea and data queue?
5 Answers Airtel, Four soft, Shahi Exports,
How to print output from openquery in as400 ?
can anyone say,what is the use of operation extended H/N/P?
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
Can we trigger an rpg program which has user interaction with display file when updating a file using the command ADDPFTRG?
what is the use of sflnxtchg?
As Packed veriable store 2 digits in 1 byte and ZONE variable store 1 digit in 1 byte... Please tell me when we have to use Packed and Zone variable...?