× 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: DOW vs DOU - Solution to Challenge
  • From: John Carr <74711.77@xxxxxxxxxxxxxx>
  • Date: 26 May 97 23:14:37 EDT


RE:     Re: DOW vs DOU - Solution to Challenge

Charlie;
Yes that was one of the 4 solutions. I'm surprised you didn't do the
following;

  KEY      CHAIN  FILEXXX
  *IN90    DOWEQ  *OFF
  XXXCODE  ANDNE   'B'

  XXXCODE  IFEQ     'A'
  KEY      READE    FILEXXX                  90  
           ITER
           ENDIF
 < ... end of in-line edits ...>

 <.... whatever process ....>
  KEY      READE   FILEXXX                 90
           ENDDO

I mean,  if 2 I/O's to the same file within 10-20 statements
is good, then 3 must be even better, Right?   :-{ 

Ya know what they say about I/O statements;
"If somes good, Mores better, and too much is just enough"

Somehow 

READ
PROCESS
PROCESS 
PROCESS

makes more sense to me than;

PROCESS
PROCESS
PROCESS
READ

The other solutions are 1. IFNE statement ending just before the READE, 
2. The subroutine thing you demonstated. (And by the way, the only reason
I'd except that from you is if you did that FOR EVERY DOW loop you
write(to process the record just read) NOT just to win a bet.) 
3. A GOTO/CAB to the READE statement. 4. The one above.

Charlie, aside from the "Structured Code" mumbo jumbo that we all use
(Primarily for self justification I really believe.) The main gotcha 
is the unintensional resetting of the *INxx within the loop.
(But after we get named indicators for EOF, NRF, BOF, etc. on the F-Specs
 that won't be a problem. Maybe you'd change heh?)
Otherwise you can't tell me that the original DOU code wasn't Short, 
Easy to understand, and Worked.  I feel ITER and LEAVE are valuable 
Opcodes, and should be used where intended.  

If one feels that they are obtuse or esoteric,  Then we're in for much worse
times with Inline Procedures, Based variables, Null terminated strings, 
Export/Import, etc.  

I'll still buy you a beer at CUDS (I guess thats a literal statement now)

I still think my solution was more esthetically pleasing to the eye. 
(But beauty is in the eye of the DOU'er)

By the way,  do you do something until it works or 
do you do something while it doesn't work? 

John P. Carr  CDP
EdgeTech 
5921 Acorn Ridge CT,   Midlothian VA. 23112
74711.77@compuserve.com 
Ph. 804-739-7689 Fax. 804-739-7950

-----------------------------------------------------------------------
Charlie wrote;

No problem John:

  KEY      CHAIN  FILEXXX              90....
  *IN90    DOWNE  *ON
  XXXCODE  ANDNE  'B'

  XXXCODE  CASNE 'A'         @@PROC     
           ENDCS
 
  KEY      READE  FILEXXX              ....90
           ENDDO

  @@PROC   BEGSR
 < ... end of in-line edits ...>

 <.... whatever process ....>
           ENDSR
<SNIP>

You owe me a drink at CUDS.

Original code sample was as follows:

>  KEY      SETLL  FILEXXX
>  *IN90    DOUEQ  *ON
>  KEY      READE   FILEXXX                 90
>  *IN90    IFEQ   *ON
>           LEAVE
>           ENDIF
>
>  XXXCODE  IFEQ    'B'
>           LEAVE
>           ENDIF
>
>  XXXCODE  IFEQ     'A'
>           ITER
>           ENDIF
> < ... end of in-line edits ...>
>
> <.... whatever process ....>
>
>           ENDDO



Charlie Massoglia, Massoglia Technical Consulting, Inc.
PO Box 1065, Okemos, MI 48854, USA
517-676-9700  Fax: 517-676-1006  EMAIL: cmassoglia@voyager.net


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the Midrange System Mailing List!  To submit a new message,   *
* send your mail to "MIDRANGE-L@midrange.com".  To unsubscribe from     *
* this list send email to MAJORDOMO@midrange.com and specify            *
* 'unsubscribe MIDRANGE-L' in the body of your message.  Questions      *
* should be directed to the list owner / operator: david@midrange.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.