dbTalk Databases Forums  

Universe Common Block Problems

comp.databases.pick comp.databases.pick


Discuss Universe Common Block Problems in the comp.databases.pick forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
jkoca
 
Posts: n/a

Default Universe Common Block Problems - 10-13-2003 , 04:25 PM






I have a series of programs the first is the main program, and the other are
called subroutines each with a subroutine statement. These are compiled and
run in PICK flavor.

All programs start with a COMMON PV.X(100), and various equates to label the
values in the matrix. The first program mat's the array to null and
establishes values in the various cells. When the second program is called
from the first, all the values are referenceable using the equated names.
When the third program is called from the second program, it issues the
COMMON PV.X(100) with the various equates, but when a value is reference, it
produces a string not defined error, and in the RAID debugger, when I
display a value such as PV.X(52) it tells me it is undefined. On vary rare
occasions Universe terminates with a Basic layer error.

Has anyone experienced this condition ? Better yet does anyone have any idea
of what I can do to correct the problem or, a way to trace what is causing
the fault. Any ideas would be appreciated.

Jim Koca



Reply With Quote
  #2  
Old   
PasTech
 
Posts: n/a

Default Re: Universe Common Block Problems - 10-14-2003 , 09:47 AM






I realize this is fairly obvious, but check for a "CLEAR" command in the
third program. Also, try named common, as opposed to unnamed common. I
created a set of test programs to see if there was something squirly about
unnamed common in pick flavored UV. Seemed to work ok. Here is my test.
Try the same test on your database. If it works, there is a problem in
code. If not, there is a problem in configuration.

Quote:
ED TEST.BP PGM1 PGM2 PGM3
SELECTed record name = "PGM1".
5 lines long.

----: P
0001: COMMON PV.X(100)
0002: FOR II = 1 TO 100
0003: PV.X(II) = II*10
0004: NEXT II
0005: CALL PGM2
Bottom at line 5.
----: Q

SELECTed record name = "PGM2".
7 lines long.

----: P
0001: SUBROUTINE PGM2
0002: COMMON PV.X(100)
0003: PRINT "PV.X(25) = ":PV.X(25)
0004: FOR II = 50 TO 100
0005: PV.X(II) += 5
0006: NEXT II
0007: CALL PGM3
Bottom at line 7.
----: Q

SELECTed record name = "PGM3".
3 lines long.

----: P
0001: SUBROUTINE PGM3
0002: COMMON PV.X(100)
0003: PRINT "PV.X(75) = ":PV.X(75)
Bottom at line 3.
----: Q

File name = TEST.BP
Record name =
Quote:
CATALOG TEST.BP PGM2 LOCAL
"PGM2" cataloged.
CATALOG TEST.BP PGM3 LOCAL
"PGM3" cataloged.

RUN TEST.BP PGM1
PV.X(25) = 250
PV.X(75) = 755


"jkoca" <dumbone (AT) comcast (DOT) net> wrote

Quote:
I have a series of programs the first is the main program, and the other
are
called subroutines each with a subroutine statement. These are compiled
and
run in PICK flavor.

All programs start with a COMMON PV.X(100), and various equates to label
the
values in the matrix. The first program mat's the array to null and
establishes values in the various cells. When the second program is called
from the first, all the values are referenceable using the equated names.
When the third program is called from the second program, it issues the
COMMON PV.X(100) with the various equates, but when a value is reference,
it
produces a string not defined error, and in the RAID debugger, when I
display a value such as PV.X(52) it tells me it is undefined. On vary rare
occasions Universe terminates with a Basic layer error.

Has anyone experienced this condition ? Better yet does anyone have any
idea
of what I can do to correct the problem or, a way to trace what is causing
the fault. Any ideas would be appreciated.

Jim Koca





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.