× 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.


  • Subject: Re: New Opcodes - %SETCELL
  • From: dhandy@xxxxxxxxxxx (Douglas Handy)
  • Date: Tue, 07 Sep 1999 21:16:11 -0400

Scott,

>Not only does it seem more "modern" to use service programs instead
>of SPECIAL files, but...  and forgive me if I'm wrong...  don't
>SPECIAL files require "record-based" I/O?
>
>I mean, you use set-length parameters to call your special program,
>don't you?
>
>Seems to me that this largely defeats the purpose of using a
>file in the IFS in the first place.

Typically a SPECIAL file would use record based I/O.  But that doesn't
mean they have to be fixed length records, although you would need to
code a record length to use as a maximum data length to be returned.

There is an implicit parameter list passed to the SPECIAL handler
program, but this can be overridden and you can pass additional
parameters beyond the requisite first four.  In the case of IFS, you'd
likely want to add parms to specify the path and file to be used,
sharing/lock levels, fixed width vs variable length records and record
delimiter, whether you wanted ASCII translation, etc.

But in the end you still haven't gained anything over just using
service program routines, except for not needing a /COPY for the
prototypes and naming the binding directory.  And you could use
READ/WRITE or whatever, if you considered that more readable than
calls like ReadIIFS().

Oh yeah, and you could use I specs to set your record identifying
indicators on input, and O specs for formatting your output. <g>

I'd prefer the service program method myself.  

Doug
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


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.