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



From: Tom Liotta
That's not how I view it. READ is 'integrated' because of its
relationship to the F-spec and the external file description ...

Yeah, the compiler probably generates quite a bit of code to implement READ, but I kind-of appreciated Walden's point about READ being syntactic sugar. I may not put it that way, but I'd say that regular folks can pack comparable functionality into a single procedure call.

I shared a complete code sample for a simple Web application in a previous message, but it might help if I explained the following two lines:

d order e ds extname(petorder) qualified

if wtnRecGet('PETORDER':%addr(order));

Note that wtnRecGet() is linked to the "PETORDER" data structure by name and address, much like the READ opcode.

PETORDER has the following definition:

A R PETORD TEXT('PET ORDERS')
A PET 1A
A ORDERDATE L DATFMT(*USA)
A COUNT 5S 0 EDTCDE(J)
A RANGE(1 1000)
A BID 7S 2 EDTCDE(J *)
A RANGE(1 1000)
A FIRSTNAME 16A CHECK(ME)
A VARLEN(16)

Behind the scenes, wtnRecGet() retrieves HTML form input elements, checks that ORDERDATE is a valid value in *USA format, checks that COUNT and BID are numeric values in the range of 1-1000, checks that FIRSTNAME is filled in; and finally maps the HTML input element values to the "order" data structure, automatically.

Otherwise wtnRecGet() automatically sends error messages to the browser, indicating the field or fields that didn't pass validity checks.

So from a programmer productivity point of view, wtnRecGet() is comparable to READ.

With respect to the HTTP protocol, it's not like IBM has the only access to low-level system routines. HTTP is more open than that.




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.