Special Files In RPG

20 pts.
Tags:
AS400. RPG
AS400/RPG
Dear All, In RPG we have the concept of "Special Files", where the I/O operations of this file is handling by user written program. Could anyone please brief me the significance of using special file and what is the advantage of Special file over disk file? It would be great, if anyone could explain some scenario to use special files.

Thanks & Regards,

Bibin  



Software/Hardware used:
AS400

Answer Wiki

Thanks. We'll let you know when a new response is added.

The way this works is that you supply the name of the “I/O handler” program that handles the file operations in a keyword on the F spec (PGMNAME). A standard parameter list is sent to that program whenever any I/O operation is performed on the file.

The standard parameter list includes the action or operation that was requested (e.g., open, read, write, update, etc.), a character field representing the record data for the file, a status code that you can use to signal conditions (e.g., an error or end of file) and an error code so the I/O handler program can signal specific errors back to the “calling” program.

If the I/O handler program needs additional information not included in those standard parameters, additional parameters may be passed. These are specified with another F spec keyword (PLIST).

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    what is the advantage of Special file over disk file? There is no advantage. Why would you think there would be an advantage? A 'special' file is little more than a way to use RPG to interface with some external programmed function. The 'special' file can provide a stable interface while the function behind it goes through significant change. Nowadays with RPG IV, there are far better alternatives -- procedures, functions, service programs.with signatures, access to essentially all APIs. Essentially everything that could have been done in old RPG with 'special' files can be done better in RPG IV without needing them. Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following