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



I have a PF(ABC)with no key fields. PF(ABC)have 2 fields (cusno and cusname). Please let me know ..

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

I have a PF(ABC)with no key fields. PF(ABC)have 2 fields (cusno and cusname). Please let me know ..

Answer / mayank taneja

In CL program:
Ovrdbf and opnqryf

In RPG Program:
SQLRPGLE

Is This Answer Correct ?    11 Yes 0 No

I have a PF(ABC)with no key fields. PF(ABC)have 2 fields (cusno and cusname). Please let me know ..

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

Post New Answer

More RPG400 Interview Questions

How can we search particular records from the database file in RPG. For example, there are 100 records in the file.i need to retrieve all the records matching/equal to the particular 'NAME' field. How can we do the above using SEARCH criteria other than using the IF cond?

4 Answers   CTS,


I want to declare the number of elements of an array dynamically in RPGLE ? Is it possible? If yes, then how do I do it ?

2 Answers  


can we perform CHAIN operation on Subfile record format....?

4 Answers  


use of PUTOVR,OVRDTA,KEEP keywords?

2 Answers   HCL,


Can we used ovrdbf command after the opnqry file if yes then What will be out put of your program?

4 Answers   IBM,






Hi guys, anybody know How RPG/400 code can be converted to RPG IV code with a single command?

1 Answers  


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.

2 Answers  


What is use of IMPORT and EXPORT in RPGLE ? What is activation Group ? What is Service Program ???? How to call another program in RPGLE ?

1 Answers  


Can we found a record existance in a file w/o reading the file?

6 Answers   Traitsys Technologies,


what do you mean by SESSION/DEVOCE ERROR?

1 Answers   IBM,


what is estimation? and what is the level identifier parameter in PF?

3 Answers   TCS,


HI, 1: WHAT IS THE FUNCTION OF %KDS?WITH PROGRAMMING CODES EXAMPLE 2: WHAT IS THE FUNCTION OF Z-ADD AND Z-SUB ? WITH PROGRAMMING CODES EXAMPLE

1 Answers   IBM,


Categories