I have a PF(ABC)with no key fields.
PF(ABC)have 2 fields (cusno and cusname).
Please let me know how can i read the cusno = 1150 directly
from PF in CL and RPG program(Without creating the LF and
without reading the complete file and then compare 1150)
Answers were Sorted based on User's Feedback
Answer / vijay
In CL PGM
do CPYF from file ABC to ABC qtemp with the selection
field (CUSTNO) = 1150 (value) so ABC in qtemp have only one
record with that cust no. then read this file in CL program.
In RPGLE...
you can used SQLRPGLE program and write a SQL select
statement on the on file ABC.
Is This Answer Correct ? | 13 Yes | 1 No |
Answer / mayank taneja
In CL program:
Ovrdbf and opnqryf
In RPG Program:
SQLRPGLE
Is This Answer Correct ? | 11 Yes | 0 No |
Answer / manan---as400 so cute
CL
This can be done by two ways :- a)ovrdbf b) opnqry
RPG
This can be done by SETLL + READE or READ and the second
requirement by COMP
Cheers
Is This Answer Correct ? | 6 Yes | 13 No |
How do you do indexing in a physical file?
this is rpg3 code W0RTN IFEQ @CN,002 what is the means @CN,002
what is program status data structure?
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.
How to change the name of physical members Dynamically?
When we have a file with Duplicate records and I want to read the unique record from the file. For example a file containing Emp Name as 'Ram' and there are 3 entries of it. So how to read a unique record from File?
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?
I have one cl program which calls two rpg programs named a & b. I am loading a run time array in Pgm A and the control comes back to cl pgm. i call pgmb and I want to read the runtime array in pgmb which was loaded in pgma. How it can be acheived. I should not use any intermediate file or dataarea to store the loaded values.
Can we have a Physical file without any member ? Please let me know
1)how to do date validation in rpg? 2)how to delete dUPLICATE RECORDS?
what is the difference between the cpyf command crtdupobj command?
Can we create 300 logical files based on a single physical file using the CRTLF command only once?.