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



Joe,

>No. I am simply suggesting enabling THE ALREADY EXISTING FREE-FORM SYNTAX in
>the fixed format.  Think about it:

>              CHAIN(X)   KLIST MYFILE

It really isn't that simple.  The fixed opcode column is restricted to 10
characters.   CHAIN(X) would take 8 without any other extenders, but in the free
format variety (which you may not be familiar with yet), CHAIN can already
accept up to 5 other extenders.  Aside from N and E, the two you probably
already know, IBM had to add H, M, and R to accomodate the fact you may be using
expressions within the list.  See the V5R2 reference manual.

CHAIN(XENHR) just doesn't fit in 10 characters.

And you'd need to add a semi-colon to the end of the statement too.  While you
may not agree with it, IBM *had* to either use an end of statement delimiter
like the semi-colon, or a line continuation character.  And those rules were
already confusing enough.

Think about it.  The main reason to use the new CHAIN(X) syntax would be to use
the (list) or %KDS() capabilities, and the chances of that fitting in solely the
extended factor2 area without a line continuation are not exceedingly high.

Now, what I *would* like to see is the ability to just drop the /free and
/end-free directives, and simply insert line(s) in free-format syntax provided
the following conditions are met:

  - Columns 6-7 are both blank (eg no C, nor a * in column 7)
  - First non-whitespace word on a statement is a valid opcode
  - Statement ends in a semi-colon (regardless of number of lines)

If those conditions weren't met just throw it out with a syntax error.  But if
they were, they you could come very close to your proposed syntax:

                 CHAIN(E)   KLIST MYFILE;
     C         IF         %FOUND(MYFILE)
     C         MOVE       DBFLD           WKFLD
     C         ENDIF

You in essence could insert free-format statements wherever, and start them in
the opcode column if you really wanted to.

But I don't know the ramifications of whether this is feasible on the compiler
side.

Doug

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.