Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Subfile questions

791 views
Skip to first unread message

access400

unread,
Aug 1, 2001, 2:48:33 AM8/1/01
to
Hello,


I have some questions about SFL...

1- What is difference between SFLINZ and SFLCLR.
(What happens if OVERLAY is specified where should I take care)

2- Why should I use SFLCLR and SFLINZ in one record format ?

3- If I use SFLCLR in my recfmt to clear the subfile ?
Which indicators should be off.

4- I red in one mail if you use SFLINZ you should
chain or update or move ---> What does it mean ? ref by UGO

5- What is Difference between ERASE(SFL1) and SFLDLT


regards,


Mesut


ps: Does someone suggest a book of SFL technic.

tmnelson

unread,
Aug 1, 2001, 12:08:13 PM8/1/01
to

"access400" <acce...@engineer.com> wrote in message
news:fdaf272.01073...@posting.google.com...

> Hello,
>
>
> I have some questions about SFL...
>
> 1- What is difference between SFLINZ and SFLCLR.
> (What happens if OVERLAY is specified where should I take care)
CLR - the record dne
INZ - the record exists but is empty - so if you have a numeric in you
sflrec spec the zeros will
show up on the screen when displayed, along with any Input style fields.
(overlay can be annoying, with subfiles depending on how its used. I only
use it so my f-key record will be displayed. (write fkeyrec exfmt sflctl)

>
> 2- Why should I use SFLCLR and SFLINZ in one record format ?
I wouldn't. Most often I find SflClr alone will do the job. I *very* rarely
use sflInz.

>
> 3- If I use SFLCLR in my recfmt to clear the subfile ?
> Which indicators should be off.
works like this
you have dspsflctl, dspsfl, and sflclr
if dspsflctl is *on SflClr should be *off and vice versa.
if sflclr is on sfldsp *must* be *off until you have rewritten records to
the sfl.
if this logic flow is screwed up you will crash every time you try to write
or exfmt your sfl

>
> 4- I red in one mail if you use SFLINZ you should
> chain or update or move ---> What does it mean ? ref by UGO
??? not sure ??? what was being discussed?

>
> 5- What is Difference between ERASE(SFL1) and SFLDLT
Sorry, never used either of them. If i have time i'll take a look and post
again later. :)

hope i was helpfull :)
Troy

Tim

unread,
Aug 1, 2001, 7:25:05 PM8/1/01
to
1. SFLCLR removes any records currently allocated to a subfile
SFLINZ clears then creates up to SFLSIZ records with default values.
2. There is no reason to use SFLINZ and SFLCLR at the same time.
3. When SFLCLR is active SFLDSP should be inactive
4. Since SFLINZ creates records with default values, you must fill those
values in with your data. WRITE adds records to the subfile, but CHAIN/UPDAT
will overwrite the existing record
5. SFLDLT deletes the space associated with a subfile and makes the subfile
inactive in the display file. You use this keyword when your display file
contains more then 32 subfiles. You must delete an active subfile before you
can activate the 33rd subfile.
SFLDSP, SFLDSPCTL, SFLCLR, and SFLDLT do not actually affect the display
when OVERLAY is active. You must take action to actually remove the
information from the display. ERASE() erases the named format from the
display when OVERLAY is active.

"access400" <acce...@engineer.com> wrote in message
news:fdaf272.01073...@posting.google.com...

access400

unread,
Aug 2, 2001, 7:04:33 AM8/2/01
to
Hello,

Thanks for your response...

Well If I good understand
SFLCLR delete de records from SUBFILE RECORD.. So you have to put de
RRN to 0.
IS it correct that if you have RRN = 10 and you do SFLINZ done the 10
records still exist in the subfile..... (with blanks or zeros filled)

I use the following source:
'MSGCNT' is the relative record field for MESSAGE RECORD 'MSGSFL'.
After first error I write the a message to the subfile I do
EXFMT CTL01 and message is on seen bottom on the screen...
After EXFMT I put the 'RRN of MSGSFL) MSGCNT = 0
when I enter with new selection if there is also wrong selection
I put ADD 1 to MSGCNT and to WRITE MSGSFL and my program dumps.....

I use API: QMHSNDPM
I says: RNX1021 Attempt to write a duplicate record to file
DSPMBRDP.
When I debug and I put manual in the debugger MSGCNT = 2 before write
It writes okay....
But I also see the old messages....

1- How can I delete the old messages from program message queue ????
I don't want to see the old message.
2- Is it right that I put MSGCNT = 0 after EXFMT ?

A* -------------------------------------------------------------------
A R MSGSFL TEXT('SFL message record')
A* -------------------------------------------------------------------
A SFL
A SFLMSGRCD(24)
* TEXT(REGEL 24)
A MSGKEY SFLMSGKEY
A PGMSGQ SFLPGMQ
A* -------------------------------------------------------------------
A R MSGCTL TEXT('SFL message control recor
A* -------------------------------------------------------------------
A SFLSIZ(0002)
A SFLPAG(0001)
A OVERLAY
A SFLCTL(MSGSFL)
A BLINK
A SFLINZ
A N29 SFLEND
A SFLDSP
A SFLDSPCTL
A PGMSGQ SFLPGMQ
A MSGCNT 4S 0H

Tim

unread,
Aug 2, 2001, 7:37:47 PM8/2/01
to
Message subfiles are different

You should use SFLINZ not SFLCLR

You should use the QMHRMVPM api to delete the program messages from the
program message queue otherwise the messages will keep reappearing everytime
the display is rewritten

"access400" <acce...@engineer.com> wrote in message

news:fdaf272.01080...@posting.google.com...

access400

unread,
Aug 3, 2001, 2:49:22 AM8/3/01
to
Hello everybody,

Thanks for replying and also many thanks to TIM...

That was my problem.. I didn't use QMHRMVPM to remove the old
messages. I did use SFLCLR to clear the subfile and I did put the RRN
of the MSGRCD to *ZEROS after each EXFMT...
So I did get ATTEMPT TO WRITE DUPLICATE RECORD ...... or sometimes I
did see the old messages

So I did delete from the DSPF SFLCLR keyword and
I use QMHRMVPM after each EXFMT and
I don't put the RRN to 0 of MSGRCD and my program is working....

Many thanks to everybody wich response to me

also thanks to TIM

0 new messages