What would be the result on writing a data record to a PF
file using the "WRITE" opcode after the SETON *ON *INLR
statment?

Answers were Sorted based on User's Feedback



What would be the result on writing a data record to a PF file using the "WRITE" opcode ..

Answer / prabhas

It will sucessfully write the data record to a PF

Is This Answer Correct ?    17 Yes 3 No

What would be the result on writing a data record to a PF file using the "WRITE" opcode ..

Answer / prabhas

All files used remain opened till it executes last 'C' spec
statement

Is This Answer Correct ?    9 Yes 1 No

What would be the result on writing a data record to a PF file using the "WRITE" opcode ..

Answer / naveen chandra joshi

It will write the record in the database file even after LR
indicator sets on.
Program execution continues till last C specification.

Is This Answer Correct ?    3 Yes 0 No

What would be the result on writing a data record to a PF file using the "WRITE" opcode ..

Answer / syam

Hi Prabhas thanks....Why it is writing? Seton *On *Inlr not
closing the pf file?

Is This Answer Correct ?    4 Yes 2 No

What would be the result on writing a data record to a PF file using the "WRITE" opcode ..

Answer / raghavendra malwadkar

It will sucessfully write the data record to a PF and only
after executing the last record, LR indicator sets on,
hence even if you specify Seton *LR any where in the
program, the LR indicator is *ON only after executing the
last record.

Hope it suffies you concern.

Is This Answer Correct ?    5 Yes 3 No

What would be the result on writing a data record to a PF file using the "WRITE" opcode ..

Answer / harshad r suryawaunshi

Write statement will get executed successfully and record
will get added in the file. Program execution continues til
the last line of C specs.

Is This Answer Correct ?    3 Yes 1 No

What would be the result on writing a data record to a PF file using the "WRITE" opcode ..

Answer / sree

The LR indicator says, the last record in the file has
reached and hence there are no input records to process. But
this will not prevent in writing the record to file.

Please correct me if I am wrong.

Is This Answer Correct ?    0 Yes 0 No

What would be the result on writing a data record to a PF file using the "WRITE" opcode ..

Answer / sakshi anand

i think it will not be executed because the files is closed when we use seton lr/or the odp is closed now.

Is This Answer Correct ?    0 Yes 2 No

What would be the result on writing a data record to a PF file using the "WRITE" opcode ..

Answer / sakthi

all files will be closed with inlr on and we can't perform write operation on a closed file. We will get error.

Is This Answer Correct ?    0 Yes 2 No

What would be the result on writing a data record to a PF file using the "WRITE" opcode ..

Answer / gsp

The 'Write' statement has to be witten before
the Lr On statement.
Reason: All files are closed and program ends
as soon as Lr is on.

Is This Answer Correct ?    5 Yes 10 No

Post New Answer

More RPG400 Interview Questions

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,


how do u find whether a record is locked or not??/

5 Answers   CTS,


explain sflclr, sflend, sfldlt, and sflcsrrrn?

0 Answers   IBM,


What is the purpose of FRCDTA keyword?

3 Answers   IBM,


what is kids-rpg?

0 Answers   IBM,






A pgm subroutine calling child subroutine, that child subroutine again calling parent subroutine, u have 1000 lines of code, with out debugging , how can u find that error??? Is there any command to find errors in pgm???

3 Answers   HSBC,


Hi friends, I am using a load all subfile , and currently i am in in the third page of the subfile , from third page i have selected a record and called some other program .on returning, subfile is being loaded from the frist page. so can any one kindly suggest me in retaining my third page after returning. i.e loading from third page.

7 Answers  


1) How to declare a file? 2) How to define a display file? 3) How to monitor error messages in RPG? 4) How to find the attributes for subfiles? and what is the DDS for subfiles?

2 Answers   TCS,


what was the robotech rpg?

0 Answers   IBM,


program to find the number of objects used in a given program through a display.

2 Answers   IBM,


Please help me, I have created window subfile,I have created Footer with same lengh and postion of window SFL. When I call the pgm, first is shows only Footer and then it shows subfile records.This time Footer is not showsing ..plz hel me how can i do it...? Sameple DDS and RPG: A R WIN1 SFL A*%%TS SD 20090130 165346 MUNSHIJ REL-V4R2M0 5769- PW1 A FLD001 1Y 0B 4 3EDTCDE (Z) A ATFILE R O 4 7REFFLD (QWHFDBAS/ATFILE LIB/LIBF- A ILE) A R WINCTL SFLCTL (WIN1) A*%%TS SD 20090202 123459 MUNSHIJ REL-V4R2M0 5769- PW1 A ALTNAME ('y') A SFLSIZ (0004) A SFLPAG (0004) A WINDOW (FOOTER) A ROLLUP (27) A ROLLDOWN (28) A CF12 (12 'Cancel') A 50 SFLDSP A N51 SFLDSPCTL A 51 SFLCLR A 1 2'Select Option,Press enter' A 2 3'1= Select' A R FOOTER A* A WINDOW(8 31 9 43) A 8 4'F12 = Cancel' A R DUMMY ASSUME A 24 10' ' in RPG: Dow *IN12 = *Off Write Footer Fxfmt WInCTL

2 Answers  


Delete FileName at first statement in RPG.

1 Answers  


Categories