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

Why we cannot call a service program? If I add a PEP can i call the service program?

1 Answers   DELL,


How do you know if a record exists without doing a READ and CHAIN?

6 Answers   IBM,


Hi, Can any body tell me ur experience on this questions? Questions: 1.what is the use of SFLRCDNBR other than subfile page display? 2.Which of the following operation cannot be used in conjuction with a file coded as device type disk?

1 Answers  


check existence of one record without using chain or read?

1 Answers   IBM,


what built in function can be used with SETLL.If you want to check whether the search argument is successful or not? Please give me answer with example?

3 Answers  






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...........

0 Answers   CTS,


how we retrieve records without using key field (ex:name) from Physical File through RPG in as/400?

8 Answers  


How many program bind in one module....

0 Answers  


HOW TO DEBUG A BATCH JOB WHEN IT IS IN MESSAGEWAIT(MSWG) STATUS.I KNOW THE STEPS FOR BATCH DEBUGGING,BUT IM CONFUSING WITH WHEN WE SUBMIT ANY JOB FOR BATCH DEBUG WE PUT IN HELD STATE.SO HERE ALSO DO SAME THING OR ANY OTHER WAY,PLEASE HELP ME....

1 Answers   HCL, Mind Tree,


A rpg or clp command to find if the file field is defined as a character or numeric field.

1 Answers   IBM,


parameters cannot be passed in which one???

4 Answers   CTS,


What is the RPG cycle?

3 Answers   CSC,


Categories