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



Yes, you said that. What we don't know, is whether the READC doesn't work
because the subroutine sr_chkhaz doesn't do anything (v_hazfrt is not "N" at
start of SR), or if it's some other reason. Maybe there are other
READs/CHAINs along the way - we don't know. We need to rely on your input
in order to help us help you.

So with that, again, have you run this through Debug?

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
Fine: (n) A tax for doing wrong.
Tax: (n) A fine for doing well.


I specified after "doesn't work" that READC doesn't see the changes; it
looks like my updates to the subfile records were not "comitted" (if I
can say it like that) until I issued a WRITE opcode for the SFLCTL, as
Scott pointed out (actually I had this WRITE opcode, but the indicators
were wrong...)


Thank you


Florin Todor





-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Dennis Lovelady
Sent: Thursday, September 30, 2010 3:36 PM
To: 'RPG programming on the IBM i / System i'
Subject: RE: Chain and Readc

Are you sure v_hazfrt = 'N' at the beginning of the SR?

What does "doesn't work" mean? Have you run this in debug? Have you
stepped past the UPDATE statement et cetera? What conditions can you
tell
us about the way it runs beyond "doesn't work?"

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
Flashlight: (n) A case for holding dead batteries.

I have an issue, which, in my opinion shouldn't be an issue at all
because it is pretty straight forward...



Anyway, I have a subfile where I need to check (for ALL records) if a
specific field has a certain value. I do this using CHAIN RRN op-code.
I, also, want to make EVERY record available for the next READC
operation; pretty simple, right? The only problem is it doesn't work!
The READC does not see any "changed" record...



Here is the relevant code:



C sr_chkhaz begsr

/Free

s1rrn = 1;

Dow s1rrn <= 30 and

sr_chkhaz = 'N';

Chain s1rrn R010D02;

If %found();

If #DHAZ = 'X' or

#DHAZ = 'H';

v_hazfrt = 'Y';

Endif;

*in37 = *on;

Update R010D02;

*in37 = *off;

Endif;

s1rrn += 1;

Enddo;

s1rrn = 1;

Write R010D03;

/End-free

C endsr



*in37 turns on/off SFLNXTCHG for R010D02 Subfile record:



A R R010D02 SFL

A 37

AO 69 SFLNXTCHG





The excerpt of the main program:



......................................................



C exsr sr_chkhaz

C move *off *in35

C *in35 doweq *off

C readc r010d02
35
<<<<<<----------*in35 is turned *on

C *in35 ifeq *off




........................................................................
.............





Any thoughts?







Thank you





Florin Todor



<mailto:ftodor@xxxxxxxxxxxxxxxx>



--
This is the RPG programming on the IBM i / System i (RPG400-L)
mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.

--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.