× 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: Subfile Question - SFLLIN cursor movement
  • From: "Simon Coulter" <shc@xxxxxxxxxxxxxxxxx>
  • Date: Sat, 15 May 99 17:52:59 +1000


Hello Gerald,

It used to work the way you expect but I think that was VRM220 and IBM "fixed" 
the compiler in 
later releases -- I know I have code that took advantage of this behaviour.  
The fix seriously 
limited the usefulnes of SFLCSRPRG.

The most straight-forward solution is to let the cursor move where it will and 
read the correct 
records programmatically.

For example, given a subfile with the following screen representation:

1 IIIIIII OOOOOOOOOOO OOOOOOOOOO           6 IIIIIII OOOOOOOOOOO OOOOOOOOOO
2 IIIIIII OOOOOOOOOOO OOOOOOOOOO           7 IIIIIII OOOOOOOOOOO OOOOOOOOOO
3 IIIIIII OOOOOOOOOOO OOOOOOOOOO           8 IIIIIII OOOOOOOOOOO OOOOOOOOOO
4 IIIIIII OOOOOOOOOOO OOOOOOOOOO           9 IIIIIII OOOOOOOOOOO OOOOOOOOOO
5 IIIIIII OOOOOOOOOOO OOOOOOOOOO          10 IIIIIII OOOOOOOOOOO OOOOOOOOOO

where the numbers are the RRN for each record.  The user will key record 1 then 
6 then 2 then 7 
etc. so you should read them in that order in your program.  Simply add 5 (in 
this case) to RRN 
before every second read and subtract 5 after every second read.  You will not 
be able to use 
READC (or READ-NEXT-MODIFIED for the COBOL challenged) because that will return 
records in RRN 
order.

Regards,
Simon Coulter.

«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»
«» FlyByNight Software         AS/400 Technical Specialists       «»
«» Eclipse the competition - run your business on an IBM AS/400.  «»
«»                                                                «»
«» Phone: +61 3 9419 0175      Mobile: +61 0411 091 400           «»
«» Fax:   +61 3 9419 0175      mailto: shc@flybynight.com.au      «»
«»                                                                «»
«» Windoze should not be open at Warp speed.                      «»
«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»
//--- forwarded letter -------------------------------------------------------
> X-Mailer: Microsoft Outlook Express 5.00.2314.1300
> Date: Wed, 12 May 99 11:15:18 -0500
> From: "Gerald Magnuson" <magnuson@knapheide.com>
> To: MIDRANGE-L@midrange.com
> Reply-To: MIDRANGE-L@midrange.com
> Subject: Subfile Question - SFLLIN cursor movement

> 
> R have a subfile with 3 fields. 1 input/output, 2 output.
> I am using SFLLIN(10) to create 2 columns of data.
> 
> I would like the cursor to move down to the next record instead
> of across.
> 
> I see that there is a keyword SFLCURPRG(subfile cursor 
> progression), but it will not work with SFLLIN.
> 
> Other than using arrays to store my data before writing to the
> subfile, How can I make the cursor move down to the next sub-
> file record instead of across to the record that is 10 records ahead?

+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| 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.