Re[2]: [RBASE-L] - Resettable Cursor

2021-12-18 Thread Bruce Chitiea
Karen: Thank you. "Resettable Cursor" is the section title dealing with 
OPEN c1 RESET in the RBASE Cursors Explained document.


Boiling my question down:

Can cursor c1's data set be dynamically altered  within cursor c1's 
WHILE ... ENDWHILE loop, so that subsequent loop cycles use the  
modified cursor's data? Will OPEN c1 RESET, within a WHILE ... ENDWHILE 
loop, do that?


Or should I
(a) make the change to c1's source table;
(b) "bookmark" my location in c1 (variable-ize the current value);
(c) ENDWHILE the loop
(d) DROP c1
(e) loop back around
(f) DECLARE c1 with the now-modified data set
(g) jump to the bookmarked location
(h) continue

Deep weeds available, if you want them.

Much appreciated, Bruce

Bruce A. Chitiea | SafeSectors, Inc.
112 Harvard Ave #272 | Claremont CA 91711-4716 | USA
rby...@safesectors.com | +011 (909) 238-9012 c | +011 (909) 912-8678 f

-- Original Message --
From: "'Karen Tellef' via RBASE-L" 
To: "rbase-l@googlegroups.com" 
Sent: 12/18/2021 5:46:16 AM
Subject: Re: [RBASE-L] - Resettable Cursor

Hi Bruce!  I'm unclear what you mean by "resettable cursor".  Do you 
mean using the  OPEN c1 RESET   command within a DECLARE CURSOR loop?


If so, quickly I'll mention that I use the RESET all the time if I am 
embedding a second cursor within the first cursor, but that's the only 
time I use it.  And if you want to see my syntax for doing that, let me 
know



Karen



-Original Message-
From: Bruce Chitiea 
To: rbase-l@googlegroups.com 
Sent: Fri, Dec 17, 2021 9:32 pm
Subject: [RBASE-L] - Resettable Cursor

Peace to all:

Can someone please send an example of a 'Resettable Cursor' [1] in use? 
I understand the use of scrolling, but ...


Wondering if the contents of a scrolling cursor can be modified during 
processing between the WHILE sqlcode <> 100 THEN and ENDWHILE 
statements.


I'm building time-series data for use in charting parallel data series, 
and using a cursor to insert zero values for time periods with no data, 
so that all the series align. When a year, say, is found to be missing, 
I'd like to pop that missing year into the cursor's source table, then 
have the cursor redefined "on the fly", so that the next 
cursor-retrieved value may be evaluated relative to the newly inserted 
value. Especially handy when there's a multi-year gap, when RELATIVE -n 
would now have the right value to land upon.


Seems like the cursor needs to be reset for that to happen.

On the right track?

Ever grateful, Bruce

Bruce A. Chitiea | SafeSectors, Inc.
112 Harvard Ave #272 | Claremont CA 91711-4716 | USA
rby...@safesectors.com | +011 (909) 238-9012 c | +011 (909) 912-8678 f

 [1] As noted in From the Edge: "R:BASE Cursors Explained" (01/04/2021)
--
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php

---
You received this message because you are subscribed to the Google 
Groups "RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to rbase-l+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rbase-l/eme9daf667-df30-4b9b-bd6c-ce382dcc669e%40pathfinder 
<https://groups.google.com/d/msgid/rbase-l/eme9daf667-df30-4b9b-bd6c-ce382dcc669e%40pathfinder?utm_medium=email&utm_source=footer>.


--
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php

---
You received this message because you are subscribed to the Google 
Groups "RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to rbase-l+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rbase-l/1434955470.2527171.1639835176988%40mail.yahoo.com 
<https://groups.google.com/d/msgid/rbase-l/1434955470.2527171.1639835176988%40mail.yahoo.com?utm_medium=email&utm_source=footer>.


--
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php
--- 
You received this message because you are subscribed to the Google Groups "RBASE-L" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to rbase-l+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rbase-l/em3cdd33f5-6c03-436a-be94-03feb59a7ab3%40pathfinder.


Re: [RBASE-L] - Resettable Cursor

2021-12-18 Thread 'Karen Tellef' via RBASE-L
Hi Bruce!  I'm unclear what you mean by "resettable cursor".  Do you mean using 
the  OPEN c1 RESET   command within a DECLARE CURSOR loop?
If so, quickly I'll mention that I use the RESET all the time if I am embedding 
a second cursor within the first cursor, but that's the only time I use it.  
And if you want to see my syntax for doing that, let me know

Karen
 
 
 
-Original Message-
From: Bruce Chitiea 
To: rbase-l@googlegroups.com 
Sent: Fri, Dec 17, 2021 9:32 pm
Subject: [RBASE-L] - Resettable Cursor

#yiv7613448107 #yiv7613448107x707264cbb7454dd 
#yiv7613448107x86b4dd35dfc94ef5a5432fdb70f5f643{font-family:'Segoe 
UI';font-size:12pt;}#yiv7613448107 blockquote.yiv7613448107cite 
{margin-left:5px;margin-right:0px;padding-left:10px;padding-right:0px;border-left:1px
 solid #cc;}#yiv7613448107 blockquote.yiv7613448107cite2 
{margin-left:5px;margin-right:0px;padding-left:10px;padding-right:0px;border-left:1px
 solid #cc;margin-top:3px;padding-top:0px;}#yiv7613448107 a img 
{border:0px;}#yiv7613448107 Peace to all:
Can someone please send an example of a 'Resettable Cursor' [1] in use? I 
understand the use of scrolling, but ...
Wondering if the contents of a scrolling cursor can be modified during 
processing between the WHILE sqlcode <> 100 THEN and ENDWHILE statements.
I'm building time-series data for use in charting parallel data series, and 
using a cursor to insert zero values for time periods with no data, so that all 
the series align. When a year, say, is found to be missing, I'd like to pop 
that missing year into the cursor's source table, then have the cursor 
redefined "on the fly", so that the next cursor-retrieved value may be 
evaluated relative to the newly inserted value. Especially handy when there's a 
multi-year gap, when RELATIVE -n would now have the right value to land upon.
Seems like the cursor needs to be reset for that to happen.
On the right track?
Ever grateful, Bruce
Bruce A. Chitiea | SafeSectors, Inc.112 Harvard Ave #272 | Claremont CA 
91711-4716 | usarby...@safesectors.com | +011 (909) 238-9012 c | +011 (909) 
912-8678 f
 [1] As noted in From the Edge: "R:BASE Cursors Explained" (01/04/2021)-- 
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php
--- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rbase-l+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rbase-l/eme9daf667-df30-4b9b-bd6c-ce382dcc669e%40pathfinder.

-- 
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php
--- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rbase-l+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rbase-l/1434955470.2527171.1639835176988%40mail.yahoo.com.


[RBASE-L] - Resettable Cursor

2021-12-17 Thread Bruce Chitiea

Peace to all:

Can someone please send an example of a 'Resettable Cursor' [1] in use? 
I understand the use of scrolling, but ...


Wondering if the contents of a scrolling cursor can be modified during 
processing between the WHILE sqlcode <> 100 THEN and ENDWHILE 
statements.


I'm building time-series data for use in charting parallel data series, 
and using a cursor to insert zero values for time periods with no data, 
so that all the series align. When a year, say, is found to be missing, 
I'd like to pop that missing year into the cursor's source table, then 
have the cursor redefined "on the fly", so that the next 
cursor-retrieved value may be evaluated relative to the newly inserted 
value. Especially handy when there's a multi-year gap, when RELATIVE -n 
would now have the right value to land upon.


Seems like the cursor needs to be reset for that to happen.

On the right track?

Ever grateful, Bruce

Bruce A. Chitiea | SafeSectors, Inc.
112 Harvard Ave #272 | Claremont CA 91711-4716 | USA
rby...@safesectors.com | +011 (909) 238-9012 c | +011 (909) 912-8678 f

 [1] As noted in From the Edge: "R:BASE Cursors Explained" (01/04/2021)

--
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php
--- 
You received this message because you are subscribed to the Google Groups "RBASE-L" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to rbase-l+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rbase-l/eme9daf667-df30-4b9b-bd6c-ce382dcc669e%40pathfinder.