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



It was my understanding that WHEN you used DIR on a SPC, that
one could use POS to move "the current" byte address, like in:

DCL DD ZZZ CHAR(256);
DCL SPCPTR .ZZZ INIT ZZZ;

DCL SPC XXX BAS(.ZZZ);
   DCL DD AAA BIN(4)  DIR;
   DCL DD BBB BIN(4)  DIR;

   DCL DD CCC CHAR(100) DIR POS(9);
      DCL DD CC1 BIN(2) DIR;
      DCL DD CC2 CHAR(8) DIR;

   DCL DD DDD CHAR(50) DIR POS(9);
      DCL DD DD1 CHAR(10) DIR;
      DCL DD DD2 CHAR(10) DIR;

The idea is that there are two substructures CCC and DDD
sharing the same area (or at least the first 50 bytes).

This does not seem to work, instead one has to code:

DCL SPC XXX BAS(.ZZZ);
   DCL DD AAA BIN(4)  DIR;
   DCL DD BBB BIN(4)  DIR;

   DCL DD CCC CHAR(100) DEF(XXX) POS(9);
      DCL DD CC1 BIN(2) DIR;
      DCL DD CC2 CHAR(8) DIR;

   DCL DD DDD CHAR(50) DEF(XXX) POS(9);
      DCL DD DD1 CHAR(10) DIR;
      DCL DD DD2 CHAR(10) DIR;

Is recollection wrong or has this changed? A long time ago,
the DEFs were not needed, you could just do as the first
snippet and it would work (IIRC).






As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.