× 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: An introduction to MI by example II...
  • From: Leif Svalgaard <l.svalgaard@xxxxxxxxxxxxx>
  • Date: Thu, 11 Nov 1999 14:59:36 -0600

Thanks again Phil.
One could make the code even shorter by removing unused data declarations.
This also makes it less readable (you often see data declarations written
that way):


> DCL SPCPTR .PARM1 PARM;
> DCL DD PARM1 CHAR(10) BAS(.PARM1);
>     DCL DD PARM-LIB-NAME CHAR(10) DEF(PARM1) POS(1);
> DCL OL PARMS(.PARM1) EXT PARM MIN(1);
> 
> DCL SPCPTR .PROGRAM INIT(PROGRAM);
> DCL DD      PROGRAM CHAR(77) BDRY(16);
>     DCL DD  PGM-BYTES-PRV      BIN(4) DEF(PROGRAM) POS( 1) INIT(77);
>     DCL DD  PGM-LIB-NAME     CHAR(30) DEF(PROGRAM) POS(12);
> 
> DCL SPCPTR .THE-STACK INIT(THE-STACK);
> DCL DD      THE-STACK CHAR(12816) BDRY(16);
>     DCL DD  STK-BYTES-PRV      BIN(4) DEF(THE-STACK) POS( 1);
>     DCL DD  STK-ENTRY(100)  CHAR(128) DEF(THE-STACK) POS(17);
> 
> DCL DD THE-ENTRY CHAR(128) BDRY(16);
>     DCL SYSPTR THE-ENTRY-PGM DEF(THE-ENTRY) POS(33);
> 
> DCL DD CALLING-PGM-NBR BIN(4);
> 
> /*********************************************************************/
> 
> ENTRY * (PARMS) EXT;
>     ADDN       STK-BYTES-PRV, 12800, 16;
>     MATINVS   .THE-STACK, *;
>     SUBN       CALLING-PGM-NBR, STK-NBR-OF-ENTRIES, 1;
>     CPYBWP     THE-ENTRY, STK-ENTRY(CALLING-PGM-NBR);
>     MATPTR    .PROGRAM, THE-ENTRY-PGM; /* CALLER */
>     CPYBLA     PARM-LIB-NAME, PGM-LIB-NAME;
>     RTX        *;
> 
> PEND;
> 
+---
| This is the MI Programmers Mailing List!
| To submit a new message, send your mail to MI400@midrange.com.
| To subscribe to this list send email to MI400-SUB@midrange.com.
| To unsubscribe from this list send email to MI400-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: dr2@cssas400.com
+---


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.