× 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 SC41-5800 System API Programming:

"Because DCL statements are actually instructions to the QPRCRTPG API and not MI instructions, they are defined in the QPRCRTPG API."
This means that the order of DCLs and DDs does not matter, but it sure makes the source more readable to us humans.

Denes.

Generally speaking, I think the order of DCLs does not matter, but sometimes it does. For example,

DCL DD Main-Variable CHAR(10);
DCL DD Sub-Variable CHAR( 2) DEF(Main-Variable) POS(1);

is a legal declaration, but

DCL DD Sub-Variable CHAR( 2) DEF(Main-Variable) POS(1);
DCL DD Main-Variable CHAR(10);

is not. Try it!

That's a good point about the readability of source. Compiler designers can make the generated MI code as ugly as they like, I guess. Doesn't matter to the machine. But for a human trying to decipher it, it matters a great deal. The all-time prize for ugly goes to the CL compiler. Try compiling an OPM CL program sometime with GENOPT(*LIST) and look at the generated MI output. Que horror!

Rich

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.