Comments on: File Issue (Declared in OUTPUT mode)http://itknowledgeexchange.techtarget.com/itanswers/file-issue-declared-in-output-mode/
Sun, 02 Aug 2015 08:47:57 +0000hourly1By: TomLiottahttp://itknowledgeexchange.techtarget.com/itanswers/file-issue-declared-in-output-mode/#comment-111345
Fri, 21 Sep 2012 20:32:31 +0000http://itknowledgeexchange.techtarget.com/itanswers/file-issue-declared-in-output-mode/#comment-111345Ignore most of that last comment of mine in this thread. It was confused by a different thread. — Tom
]]>By: TomLiottahttp://itknowledgeexchange.techtarget.com/itanswers/file-issue-declared-in-output-mode/#comment-111343
Fri, 21 Sep 2012 20:25:02 +0000http://itknowledgeexchange.techtarget.com/itanswers/file-issue-declared-in-output-mode/#comment-111343As of yet, we don’t know enough to say whether FRCRATIO() on the file or in an override or some different approach is better. This file might simply be one record per batch number or it might be all records for a batch with any numbers of records possible. We don’t know processing requirements. We don’t have a clue why multiple programs are adding AND deleting from this file nor anything else useful. The OP is not giving us information we can use to give reliably appropriate responses. — Tom
]]>By: BigKathttp://itknowledgeexchange.techtarget.com/itanswers/file-issue-declared-in-output-mode/#comment-111334
Fri, 21 Sep 2012 17:18:56 +0000http://itknowledgeexchange.techtarget.com/itanswers/file-issue-declared-in-output-mode/#comment-111334if you want to use FRCRATIO(1), use it as an OVRDBF parameter in a wrapper CL program for your job. FRCRATIO(1) compiled on the file itself will SEVERELY impact the performance of CPYF’s, restores, and all the other things you might need to do when staging data for testing
]]>By: TMACDB2COEhttp://itknowledgeexchange.techtarget.com/itanswers/file-issue-declared-in-output-mode/#comment-111302
Thu, 20 Sep 2012 19:03:19 +0000http://itknowledgeexchange.techtarget.com/itanswers/file-issue-declared-in-output-mode/#comment-111302You do NOT need to force the change to auxiliary to have it be visible by other jobs. You do need to it get flushed out of your program buffer into the file or table to be available to be accessed by others. Setting force write ratio in the file is the wrong way to solve this problem, especially on the file since now every time the DB does a change we synchronously write that change. You should turn off blocked writes at the program level if you want the row immediately visible by others.
]]>By: frmdevahttp://itknowledgeexchange.techtarget.com/itanswers/file-issue-declared-in-output-mode/#comment-109615
Fri, 27 Jul 2012 20:49:15 +0000http://itknowledgeexchange.techtarget.com/itanswers/file-issue-declared-in-output-mode/#comment-109615Hi All, thanks for all your reponse. Resolved the issue by following ways.
1. Compiling the PF with FRCRATIO as 1
2. declared the file in output mode along with BLOCK(*NO)
Special Thanks to Phil and Tom
]]>By: philpl1jbhttp://itknowledgeexchange.techtarget.com/itanswers/file-issue-declared-in-output-mode/#comment-109600
Fri, 27 Jul 2012 12:03:07 +0000http://itknowledgeexchange.techtarget.com/itanswers/file-issue-declared-in-output-mode/#comment-109600On a write, RPG doesn’t necessarily send the update immediately to db2 unless the file demands every record, ie (unique key, key constraint, certain setting on the file, certain setting on the override) or the program forces it.

The program loads an output buffer and sends multiple records to the db when the buffer is full or the program ends with *INLR on.

So you recompiled the database..did you use all the parameter settings that it had previously? And you changed to 6.1 which might change the buffer size/logic.

You have four options. Change parameters on the PF to force writes. Apply an override to force writes, change the rpg code F-spec to Insert-Add, add a c-spec after the write to force the write. \

We always try to confuse, but don’t alway succeed.
Phil
]]>By: TomLiottahttp://itknowledgeexchange.techtarget.com/itanswers/file-issue-declared-in-output-mode/#comment-109579
Thu, 26 Jul 2012 22:00:42 +0000http://itknowledgeexchange.techtarget.com/itanswers/file-issue-declared-in-output-mode/#comment-109579Is the file journaled? Is any session that is using the file running under commitment control? What options are specified on the SQL statement?

Tom
]]>By: frmdevahttp://itknowledgeexchange.techtarget.com/itanswers/file-issue-declared-in-output-mode/#comment-109577
Thu, 26 Jul 2012 21:50:53 +0000http://itknowledgeexchange.techtarget.com/itanswers/file-issue-declared-in-output-mode/#comment-109577I am providing more info here,
Currently we are having V6R1M0 version. So I took the file which was compiled with V5R4M0 version and declared in the same program with output mode. When I checked the data during the program runs, I can able to fetch the data and also able to SQL it.
Then I took the same DDS and compiled with recent version V6R1M0 and compiled the same RPGLE program, I couldn’t see the record after it is written into the file when program runs. I can able to see the written records only after ending the program. Please help me on this very strange scenario.
]]>By: frmdevahttp://itknowledgeexchange.techtarget.com/itanswers/file-issue-declared-in-output-mode/#comment-109573
Thu, 26 Jul 2012 19:26:28 +0000http://itknowledgeexchange.techtarget.com/itanswers/file-issue-declared-in-output-mode/#comment-109573The file FIL1 is a PF and there is no Key on it.
Durng debug mode, I have checked the file WRITE operation completed with out any error and in another session, I tried to SQL it but the query doesn’t display record. If I come out of the program (mean to say *INLR = *ON), then I can able to see the record which was written earlier. So records are written in the file when program runs but able to see the reocrd only end of the program. In my case, I declared the file in OUTPUT in the program which ends when they do IPL. If I change the declarartion from OUTPUT to Input with Record addition, then I can able to see the records when the program runs too. Is it the behaviour of output mode or something I am doing wrong in compilation?
Thanks for all your response!!!
]]>By: NickHutcheson1http://itknowledgeexchange.techtarget.com/itanswers/file-issue-declared-in-output-mode/#comment-109570
Thu, 26 Jul 2012 16:30:10 +0000http://itknowledgeexchange.techtarget.com/itanswers/file-issue-declared-in-output-mode/#comment-109570Trigger on Fil1 – when records are written to the file, pgm B does whatever.More information may help us help you.
]]>