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

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

Join the forum, it's quick and easy

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

Get Answers for all your queries on IBM i (AS/400).
PMS Information Systems
Would you like to react to this message? Create an account in a few clicks or log in to continue.

How to write Data to Variable File using RPG ?

Go down

file - How to write Data to Variable File using RPG ?  Empty How to write Data to Variable File using RPG ?

Post  maran 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


maran
maran
Admin

Posts : 442
Join date : 2009-07-24

https://pmsinformationsystem.forumotion.net

Back to top Go down

Back to top

- Similar topics

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