× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



If your program does only SEQUENTIAL operations (such as having the file as
an Output file in the File specification or using only READ operations
against an Input or Update file or <shudder> using it as an Input Primary or
Update Primary file), the RPG compiler generally creates code that causes
the writes or reads to be blocked based on a calculated blocking factor.

In ILE, you can specify BLOCK(*NO) on the file to prevent this.  With
RPG/400 or ILE RPG you can either change or override the file to use the
FRCRATIO(1) as previously described, or override the file to use
SEQONLY(*NO).

If your program does ANY random operations against the file, like CHAIN,
SETLL, READE, (which requires that you define it in the program as Input or
Update), then the compiler will NOT block reads/writes to the file.

Here is a link to the this topic in the "V4R4 ILE RPG for AS/400
Programmer's Guide (QB3AGY03)":

<http://publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/qb3agy03/4.3.2.4?ACTION
=MATCHES&REQUEST=file+blocking&TYPE=FUZZY&SHELF=QB3AYC05&DT=19990317104340&s
earchTopic=&searchText=TEXT&searchIndex=INDEX&rank=RANK&ScrollTOP=FIRSTHIT#F
IRSTHIT
>

This also affects the feedback that you receive in the file information data
structure (INFDS), if you have one defined for the file.  The fields in the
INFDS get updated ONLY when BLOCKS of data are transferred.  If you are
performing sequential-only operations against the file and you need accurate
information in the INFDS for the file, you MUST force the file to NOT be
blocked by using one of the described techniques.

HTH


----- Original Message -----
From: "Vishnu Rao (RBIN/DBA-EMS) *" <Vishnu.Rao@in.bosch.com>
To: <rpg400-l@midrange.com>
Sent: Tuesday, October 01, 2002 5:55 AM
Subject: Writing records to database.


> Hi,
>
> I am trying to write a record to the database file through RPGIV pgm.
Though the write is successfull , I am not able to see the records in the
file as long as the program is active.
> Once the program is terminated I am able to see the record written.
>
> I am not able to find the reason for this , The file is not journalled &
it is not open in the commit mode in the pgm.
>
> Can anyone please let me know the reason for this.
>
> Thanks in advance
> Vishnu
>
> _______________________________________________
> This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
> To post a message email: RPG400-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
> or email: RPG400-L-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.
>


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.