PMS Information Systems
Welcome to PMS Information Systems - IBM i (AS/400) Forum !!!

Get Answers for all your queries on IBM i (AS/400).

How to write Data to Variable File using RPG ?

Go down

How to write Data to Variable File using RPG ?

Post  maran on Thu Jul 28, 2011 1:32 pm

We can use C routines to achive this.

Unlike the RPG opcodes, however, the C routines are all implemented as subprocedures, and don't need to know the name of the file or its layout at compile time. One advantage to that is that you can make it work with any file with no code changes. The disadvantage is that they're ever-so-slightly slower than RPG's opcodes.

The following C routines you can call in the RPG program to do the same.

_Ropen: opens a record-oriented file
_Rwrite: writes a record to a record-oriented file
_Rclose: close a record-oriented file


Posts : 442
Join date : 2009-07-24

View user profile

Back to top Go down

Back to top

- Similar topics

Permissions in this forum:
You cannot reply to topics in this forum