Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 04 FEB 2005 01:42:30PM Steve Bell wrote:

I have a programm doing a select by @id setting cursor_no by at ….

worked ok until I run the program from a VOC record. Then my select hangs.

It's been a while, how do I make this work?

Steve Bell


At 04 FEB 2005 03:15PM Matt Sorrell wrote:

Steve,

Maybe I just haven't had enough coffee yet (it's only 1415 here :) but I'm a little confused.

Are you saying you performed a SETPROGRAM to catalog the program and are trying to execute the program from a VOC, or are you saying that you have written a TCL VOC item that tries to execute the select?

msorrel@greyhound.com

Greyhound Lines, Inc.


At 04 FEB 2005 03:29PM Steve Bell wrote:

The select is in a catologed bp programm. Then from a VOC record, I run the programm and the select hangs. If I run the programm from the system prompt, it selects ok.


At 07 FEB 2005 06:35AM support@sprezzatura.com wrote:

Could you post the relevant code section?

support@sprezzatura.com

The Sprezzatura Group Web Site

World Leaders in all things RevSoft


At 07 FEB 2005 09:40AM Steve Bell wrote:

BP RTCB015.000 (CATALOGED) IN VOC RECORD "TABLE_TAPE"

CURSOR_NO='

SELECT 'T_TABLE' BY @ID SETTING CURSOR_NO ELSE

 STOP

END

LOOP

 READNEXT @ID USING CURSOR_NO BY AT ELSE DONE=1

UNTIL DONE

 READ THIS_REC FROM T_TABLE,@ID ELSE DEBUG

When this bp programmm is run from the voc record "table_tape",

the select hangs …. other wise from the : prompt it runs ok.


=== At 07 FEB 2005 10:18AM support@sprezzatura.com wrote: ===

Where in the program is it hanging? How many active cursors are used already?

support@sprezzatura.com

The Sprezzatura Group Web Site

World Leaders in all things RevSoft


At 07 FEB 2005 10:26AM Steve Bell wrote:

I can't tell. the first record never gets read. I'm thinking nothing is getting selected.


At 07 FEB 2005 10:41AM support@sprezzatura.com wrote:

Put a Debug before the select then single step. Also see what cursor number is assigned.

support@sprezzatura.com

The Sprezzatura Group Web Site

World Leaders in all things RevSoft


At 07 FEB 2005 11:34AM Steve Bell wrote:

Still looks to me like it's printing my last print line,

then either it stops or hangs right there at the Select.


At 07 FEB 2005 11:38AM support@sprezzatura.com wrote:

What is the VOC entry - a standard RBASIC type, VERB1, VERB2? Is the program defined as a subroutine or a function? When you say running from TCL do you mean RUN PROGFILE PROGNAME versus just PROGNAME?

support@sprezzatura.com

The Sprezzatura Group Web Site

World Leaders in all things RevSoft


At 07 FEB 2005 12:58PM Hippo wrote:

I cannot see a REPEAT command … isn't it a problem?

LOOP

UNTIL

REPEAT


At 07 FEB 2005 03:21PM Steve Bell wrote:

ok here's the hole thing,

Subroutine RTCB015.000

*DECLARE FUNCTION INSERT

OLD_KEY='

NEW_KEY='

DONE=0

THIS_REC='

CNT=0

CK_CNT=0

TOTAL_CNT=0

THIS_GAME='

THIS_BOOK='

THIS_RETAILER='

THIS_FROM_RTC='

THIS_THRU_RTC='

THIS_POST_DT='

OPEN ,'T_TABLE' TO T_TABLE ELSE PRINT "CAN'T OPEN T_TABLE FILE" END OPEN ,'RTC_HOLD' TO RTC_HOLD ELSE

PRINT "CAN'T OPEN RTC_HOLD FILE

END

PRINT @(-1)

PRINT @(2,5):'REMAKING RTC-FILE… ADDING T_TABLE RECORDS'

CURSOR_NO='

SELECT 'T_TABLE' BY @ID SETTING CURSOR_NO ELSE

 STOP

END

LOOP

 READNIXT @ID USING CURSOR_NO BY AT ELSE DONE=1

UNTIL DONE

 READ THIS_REC FROM T_TABLE,@ID ELSE DEBBUG
 THIS_GAME       =THIS_REC
 THIS_BOOK       =THIS_REC
 THIS_RETAILER   =THIS_REC
 THIS_FROM_RTC   =THIS_REC
 THIS_THRU_RTC   =THIS_REC
 THIS_POST_DT    =ICONV(THIS_REC,"D")
 OLD_KEY=@ID
 NEW_KEY=THIS_GAME:"*":THIS_BOOK
 GOSUB CKI_RTC
 IF CK_IT=OK" THEN
    OUT_REC='
    OUT_REC =THIS_RETAILER
    OUT_REC=THIS_FROM_RTC
    OUT_REC=THIS_THRU_RTC
    OUT_REC=THIS_POST_DT
    OUT_REC=ICONV(DATE(),"D")
    WRITE THIS_REC TO RTC_HOLD,NEW_KEY ELSE DEBUG
    DELETE T_TABLE,OLD_KEY ELSE DEBUG
    CNT += 1
    PRINT @(6,8):'COPIED  =:CNT
    PRINT @(6,9):'INSERTED=:CK_CNT
    TOTAL_CNT=CNT + CK_CNT
 END

ON:

 REPEAT
 PRINT @(6,10):'TASK COMPLETED    TOTAL_COUNT =:TOTAL_CNT
 PRINT @(6,12):'OK  ? ;':;INPUT X
 RETURN

CK_RTC:

 CK_REC='
 A=CK_REC
 B=CK_REC
 C=CK_REC
 AA=INSERT(A,0,-1,0,THIS_FROM_RTC)
 BB=INSERT(B,0,-1,0,THIS_THRU_RTC)
 CC=INSERT(C,0,-1,0,THIS_POST_DT)
 CK_REC=AA
 CK_REC=BB
 CK_REC=CC
 WRITE CK_REC TO RTC_HOLD,NEW_KEY ELSE DEBUG
 DELETE T_TABLE,OLD_KEY ELSE DEBUG
 CK_IT='
 CK_CNT += 1

END ELSE

 CK_IT=OK"

END

RETURN

MY VOC RECORD IS

TCL

CLEARFILE T_TABLE

IMPORT ASCII T_TAPE

RTCB015.000


At 07 FEB 2005 03:54PM support@sprezzatura.com wrote:

The program as posted has several errors - it'd be better if from TCL you

COPY PROGFILENAME PROGNAME TO:(DOS C:\PROG.TXT (I

Then use NOTEPAD to open PROG.TXT and paste it in here.

support@sprezzatura.com

The Sprezzatura Group Web Site

World Leaders in all things RevSoft


At 07 FEB 2005 03:55PM Matt Sorrell wrote:

Steve,

What happens if you run each of the commands in your VOC manually?

Are there any indexes on T_TABLE? I am wondering if you are running into an index update after the import, but your select is using @ID, so I don't believe that would force an index flush. Of course, if your system is configured to flush indexes on every select, then it would. How many records are you importing, and is the import succeeding?

Just some thoughts,

msorrel@greyhound.com

Greyhound Lines, Inc.


At 07 FEB 2005 04:11PM Steve Bell wrote:

MY IMPORT IS GOOD. ABOUT 1143 RECORDS

NOTHING I,M USING SHOWS UP IN INDEXTED TABLES.

AS EVERYTHING SETS, IF I RUN MY PROGRAMM FROM THE :RTCB015.000,

IT RUNS FINE.


At 08 FEB 2005 05:33AM The Sprezzatura Group wrote:

Given the code is buggy, and wouldn't work as typed in, without seeing the actual, best suggestion right now is add some CLEARSELECT commands to clean out the cursor, or try assigning one directly.

The Sprezzatura Group

World Leaders in all things RevSoft


At 08 FEB 2005 11:41AM Hippo wrote:

As sprezz mentioned, there are some typos:

DEBBUG, READNIXT, unbalanced END ELSE in CK_RTC:

Comments:

Why the TOTAL_CNT is computed inside the loop?

The label ON:?

Does CK_REC=THIS_POST_DT work?

To the original question:

How do you call the RTCB015.000 when it works fine?

A) TCL: RTCB015.000

B) TCL: RUN RTCB015.000

C) other possibility


=== At 08 FEB 2005 11:44AM support@sprezzatura.com wrote: ===

It SEEMS from what we're reading that the extended select syntax used here is redundant and may as well just be replaced with a

CLEARSELECT

SELECT FileVar

but we'd like to see a clean version of the code first. Then we can help tidy up some other redundancies while we're at it.

support@sprezzatura.com

The Sprezzatura Group Web Site

World Leaders in all things RevSoft

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/355c76c46142047185256f9e0066c4ae.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1