I had ruestion in one of the interview.....
If 1 file has more than 1 member and i want to use the 2nd
member in the RPG pgm (in RPG400),how can I use this....
I know the possible answers i.e. useing API 'QCMDEXE' or
Before calling the pgm I can use OVRDBF for that member...

but I dont' want to use both the tips in above scenarion.

Does any body tell me how can i use this ....?

Answer Posted / samul

Sweta,

I think above scenario will clear what am trying to ask.
---------------------------
I have following scenario :-
a) One file says FILEA,has a three members
Members : Mem01 ,Mem02 ,Mem03
b) I want to use member Mem02 in my RPG400 program
(PGM01). (I have to use only RPG400 not RPGIV/RPGILE)

c) I don't want to use QCMDEXE,EXTMBR or OVRDBF in program
PGM01.

How can I do it....?

---------------------------

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how do you specify the number of records to roll in a subfile ?

1249


Write a logic program for knowing the repeated number of a vowels in a given program?

3313


how to validate input values in display file ?

671


can you explain the difference between spacea,spaceb,skipa and skipb. I'm new to learning about as400 and printer files. can any one give me an example using source code showing the difference that occurs between using these 4 keywords. A-Physical file PF004 source UNIQUE R RR STUNAM 10 ROLLNU 5 0 MARKS 3 0 SEX 6 K ROLLNU 4 records present in PF004 are STUNAM ROLLNU MARKS SEX KAVYA 12,344 55 FEMALE MADHAVAN 14,579 60 MALE RAMYA 14,785 70 FEMALE KRISHNAN 14,988 72 MALE B-Printer File PRINT1 source A R HEADER A 10 3'STUNAM' A 10 20'ROLLNU' A 10 30'MARKS' A 10 40'SEX' A R DETAIL A SPACEB(1) A STUNAM 10 3 A ROLLNU 5 0 20 A MARKS 3 0 30 A SEX 6 40 A R FOOTER A SPACEB(1) A 20'END OF REPORT' C-RPG/400 Program PRTTPG source FPF004 I F E DISK FPRINT1 O E PRINTER C WRITE HEADER C READ PF004 60 C *IN60 DOWEQ *OFF C WRITE DETAIL C READ PF004 60 C ENDDO C WRITE FOOTER C SETON LR D-spooled file result set Display Spooled File File . . . . . : PRINT1 Page/Line 1/10 Control . . . . . Columns 1 - 130 Find . . . . . . *...+....1....+....2....+....3....+....4....+....5....+.... 6....+....7....+....8....+....9....+....0....+....1....+.... 2....+....3 STUNAM ROLLNU MARKS SEX KAVYA 12344 055 FEMALE MADHAVAN 14579 060 MALE RAMYA 14785 070 FEMALE KRISHNAN 14988 072 MALE END OF REPORT Bottom F3=Exit F12=Cancel F19=Left F20=Right F24=More keys I have changed from SPACEB to SPACEA now in my printer file source E-Changed PRINT1 Source A R HEADER A 10 3'STUNAM' A 10 20'ROLLNU' A 10 30'MARKS' A 10 40'SEX' A R DETAIL A SPACEA(1) A STUNAM 10 3 A ROLLNU 5 0 20 A MARKS 3 0 30 A SEX 6 40 A R FOOTER A SPACEA(1) A 20'END OF REPORT' F-Spooled file Result Set after keyword change Display Spooled File File . . . . . : PRINT1 Page/Line 1/10 Control . . . . . Columns 1 - 130 Find . . . . . . *...+....1....+....2....+....3....+....4....+....5....+.... 6....+....7....+....8....+....9....+....0....+....1....+.... 2....+....3 KAVYAM 12344U 055KS FEMALE MADHAVAN 14579 060 MALE RAMYA 14785 070 FEMALE KRISHNAN 14988 072 MALE END OF REPORT Bottom F3=Exit F12=Cancel F19=Left F20=Right F24=More keys Overprinting not displayed.

10253


under given circumstances, my cgi should link to another site. How to implement this?

578






can a indexed file be accessed in arrival sequence in rpg program?

951


if dspatr(pc) and csrloc were specified for a format, which keyword would have priority?

1006


what is the necessary keyword for non-join logical file?

1176


what is the difference between *like and *namvar ?

1562


any one have give AS400 study material? pls pass it to gopalsai789@gmail.com

1230


what would be the effect on the field where reverse image, underline and highlight display attributes were active?

940


What is the use of jdftval in as400?

914


How to convert a spool file to PDF file in AS400?

741


what is a primary file?

1053


What is array in as400? What are the types of array?

627