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




RE:     SFLINZ (or) SFLCLR

>Hello all;
>As a new AS400 person I have a quick question that requires your
>opinions:
>On Subfiles (they're very neat!) If I have a file that just contains a
>Key say.. account number.  eg) 12345 and then a sequencing part of the
>key..say eg)  001 002 003....etc
>Ergo--
>12345001 Hi Billy here is text line 1
>12345002 Here is text line number 2
>12345003 thisr line
>etc.....etc.....
>If I am updating and adding to this file using an interactive screen
>job, should I use the SFLINZ and initialize my subfile with blanks
>(OR)
>Would you recommend using the SFLCLR and then reading the existing text
>and WRITING them to the subfile and then WRITING some blank records
>after your done reading the existing records, to provide the user with
>some useable keying text lines.
>Advice appreciated.
>:-Tim & Dana Truax-: Tim Truax <truax@usaor.net>

Tim & Dana

Oh Gee, I think I see the start of another religious war.
Not being one to feign at firing the first shot..

IMHO...  SFLINZ should be used 98% of the time for MSG Subfiles only.
But first what is your shop standards? (Just thought I'd ask)

1st how complex do you want to be?

This seems to belong to the 'rude/crude/lude' green screen text editor 
variety subfile.  Lately I have been using 'Reuse deleted records *YES'
on the physical file for these types of text files/functions.  

I then build it by writing the existing text to the screen and filling 
in the rest of the SFLPAG with blank records.  Use SFLNXTCHG on the 
subfile to read all subfile records.  

When updating the Physical file,  I first do a DELETE WHERE SQL routine
to delete all records of that top level key(Account number in your case). 
Then read the subfile(all records) and write to the data base those SFL 
records where TEXT IFNE *BLANK.  The REUSEDLT(*YES) does the automatic 
cleanup of adds/deletes.

This technique is easy to code, Least moving parts,  Easiest to maintain.
These are my number one priorities. Performance usually all ways takes 
a back seat to these. (AS/400 30% performance increase per release?)

This is with the understanding that you will never build a 'Word Processer'
using DDS subfiles. 

You will hear(as have I and everybody else who ever wore a 
'Maintenance Programmer Hat')  much more elaborate, functional, 'neat',
complex, routines suggested which may take up thousands of lines of code
with arrays and indexes galore.  (What do you do about inserts, wordwraps,
deleting a line, unique sequence numbers, or my favorite
'Gee, lets make the whole screen one big text string!' and on and on. BTDT.)

These usually fall under a category I call ESOTERIC.
ESOTERIC = Something whose meaning is obscure, obtuse, is not self-evident,
or only known by a chosen few. (The chosen few normally equates to 
'Just the Author' and after two months even she/he has to have ten cups of 
coffee and a complete source listing and 6 hours research time just to say 
'Oh ya, I remember now'.) Try and fix one of these at 4:55pm on a friday.

There then... Let the games begin!

(P.S. I Did say IMHO,  Right?)

John Carr
EdgeTech
Consulting / Software / Training

+---
| 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 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-Ups:

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.