1.How to read a subfile in out put mode?
2.what are the keywords used to share same file?
3.using composite key which rpg code used?

Answers were Sorted based on User's Feedback



1.How to read a subfile in out put mode? 2.what are the keywords used to share same file? 3.using ..

Answer / syam

A2. Share open data path = *Yes
A3. KLIST & KFLD in Free Format %KDS

Is This Answer Correct ?    1 Yes 0 No

1.How to read a subfile in out put mode? 2.what are the keywords used to share same file? 3.using ..

Answer / preethi

1. Why do u need to read a subfile which is in output mode? There is going to be no changed record, so READC will not work.
3. KLIST

Is This Answer Correct ?    1 Yes 0 No

1.How to read a subfile in out put mode? 2.what are the keywords used to share same file? 3.using ..

Answer / abhiraj

a1. by CHAIN opcode
a2 and a3 same as syam's ans

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More RPG400 Interview Questions

How to search particular records from the database file in rpg?

2 Answers  


3. Given the DOS Specification below and the following information: • Indicator 50 is off • No records have been written to the subfile What will be the result if the EXFMT operation code is performed on the record format CTLR? A R SUBFL A DESCRIP 101 6 1ODSPATR(UL) A DFT(’NOT FOUND’) A R CTLR SFLCTL(SUBFL) A N50 SFLDSP A SFLDSPCTL A SFLINZ A 67 SFIJEND A SFLSIZ(13) A SFLPAG(12) A ACCOUNTNO 100 S 10 a.) Only AccountNo will display b.) SUBFL will be initialized with 13 blank records c.) An I/O exception error will occur d.) The screen will display 12 records with ‘NOT FOUND’

4 Answers   IBM,


I have a file .In that file i have 3 fields. Those fields are eno, ename, esal.Keyfield is eno. In that file i have data like this for eno 1,2,3,4,5. Now i need to display 2nd record. That means i need to set the pointer on 2nd record... Then, write the complete rpg program using setll.

1 Answers  


How to create a login screen using a command instead of display file.... intention is to get a password field on a command..... how do you achieve this...

0 Answers  


how do I declare a minor?

0 Answers   IBM,






1.find most occurrences of a character. for exm: input:aaabbbbdddddyyy output: d 5 times how can i get that?

13 Answers   HCL,


In case if I want to know whether a record exists in a file, which one do you prefer CHAIN or a SETLL and why ?

1 Answers  


what is file identifier wher we can use

1 Answers   IBM,


what is use of sflnxtchg and use of MDT(modify data tag).both r same r not and can we use these on dspf and subfile.

2 Answers  


I have a RPG program of 100 Lines and first line is to SETON indicator LR. Will the program execute rest of the 99 Lines?

6 Answers  


I need to generate outfile for object of all the user lib. in the sysmte using cmd DSPOBJD. But this cmd is correcpted in my server,Any body tell me is there any alternative...?

2 Answers  


What is a record lock error?

0 Answers   Wipro,


Categories