NOFILE ENQUIRY RETURNED ZERO ON DISTRIBUTED TABLE
- rsolapade
- Topic Author
- Visitor
12 years 2 months ago #12537
by rsolapade
NOFILE ENQUIRY RETURNED ZERO ON DISTRIBUTED TABLE was created by rsolapade
Hi,
We are currently on jBASE 4.1 minor 21 on LINUX .... T24 release is R6....
I have a distributed file, and when I use SELECT command in the jbase routine
i.e. SELECT FBNK.STMT.ENTRY
to get some records without specifying the PART NUMBERS, it return ZERO.... see below the distributed part numbers....
-->LIST-DISTRIB FBNK.STMT.ENTRY
Partitioning Algorithm is USER Subroutine 'PART.ALGO.STMT'
Part file 'FBNK.STMT.ENTRY.1', part number 1
Part file 'FBNK.STMT.ENTRY.2', part number 2
Part file 'FBNK.STMT.ENTRY.3', part number 3
Part file 'FBNK.STMT.ENTRY.4', part number 4
Part file 'FBNK.STMT.ENTRY.5', part number 5
Part file 'FBNK.STMT.ENTRY.6', part number 6
Part file 'FBNK.STMT.ENTRY.7', part number 7
Part file 'FBNK.STMT.ENTRY.8', part number 8
Part file 'FBNK.STMT.ENTRY.9', part number 9
jsh tm2 ~ -->
When the enquiry is run then
The output returned is ZERO.....
since the base table of this enquiry is based on the DISTRIBUTED table called STMT.ENTRY.
Since definitely this file is distributed.... do I need to know and specified the PART FILE NUMBERS if the file is distributed in other to select/read the file???
Any ideas
Thanks,
We are currently on jBASE 4.1 minor 21 on LINUX .... T24 release is R6....
I have a distributed file, and when I use SELECT command in the jbase routine
i.e. SELECT FBNK.STMT.ENTRY
to get some records without specifying the PART NUMBERS, it return ZERO.... see below the distributed part numbers....
-->LIST-DISTRIB FBNK.STMT.ENTRY
Partitioning Algorithm is USER Subroutine 'PART.ALGO.STMT'
Part file 'FBNK.STMT.ENTRY.1', part number 1
Part file 'FBNK.STMT.ENTRY.2', part number 2
Part file 'FBNK.STMT.ENTRY.3', part number 3
Part file 'FBNK.STMT.ENTRY.4', part number 4
Part file 'FBNK.STMT.ENTRY.5', part number 5
Part file 'FBNK.STMT.ENTRY.6', part number 6
Part file 'FBNK.STMT.ENTRY.7', part number 7
Part file 'FBNK.STMT.ENTRY.8', part number 8
Part file 'FBNK.STMT.ENTRY.9', part number 9
jsh tm2 ~ -->
When the enquiry is run then
The output returned is ZERO.....
since the base table of this enquiry is based on the DISTRIBUTED table called STMT.ENTRY.
Since definitely this file is distributed.... do I need to know and specified the PART FILE NUMBERS if the file is distributed in other to select/read the file???
Any ideas
Thanks,
Please Log in or Create an account to join the conversation.
- armin
- Offline
- Elite Member
- “So long - and thanks for all the fish!”
Less
More
- Posts: 300
- Thank you received: 57
12 years 2 months ago #12543
by armin
Replied by armin on topic NOFILE ENQUIRY RETURNED ZERO ON DISTRIBUTED TABLE
What is the result of VERIFY-DISTRIB
and which entries do you have in VOC for FBNK.STMT.ENTRY...
and which entries do you have in VOC for FBNK.STMT.ENTRY...
Please Log in or Create an account to join the conversation.
- rsolapade
- Topic Author
- Visitor
12 years 2 months ago #12544
by rsolapade
Replied by rsolapade on topic NOFILE ENQUIRY RETURNED ZERO ON DISTRIBUTED TABLE
Hi,
Thank for your interest. Here is the result please;
~ -->VERIFY-DISTRIB FBNK.STMT.ENTRY
Partitioning Algorithm is USER Subroutine 'PART.ALGO.STMT'
User subroutine OK.
Part file 'FBNK.STMT.ENTRY.1', part number 1 - OK
Part file 'FBNK.STMT.ENTRY.2', part number 2 - OK
Part file 'FBNK.STMT.ENTRY.3', part number 3 - OK
Part file 'FBNK.STMT.ENTRY.4', part number 4 - OK
Part file 'FBNK.STMT.ENTRY.5', part number 5 - OK
Part file 'FBNK.STMT.ENTRY.6', part number 6 - OK
Part file 'FBNK.STMT.ENTRY.7', part number 7 - OK
Part file 'FBNK.STMT.ENTRY.8', part number 8 - OK
Part file 'FBNK.STMT.ENTRY.9', part number 9 - OK
Part file 'FBNK.STMT.ENTRY.10', part number 10 - OK
Part file 'FBNK.STMT.ENTRY.11', part number 11 - OK
Part file 'FBNK.STMT.ENTRY.12', part number 12 - OK
Part file 'FBNK.STMT.ENTRY.13', part number 13 - OK
Part file 'FBNK.STMT.ENTRY.14', part number 14 - OK
Part file 'FBNK.STMT.ENTRY.15', part number 15 - OK
Part file 'FBNK.STMT.ENTRY.16', part number 16 - OK
Part file 'FBNK.STMT.ENTRY.17', part number 17 - OK
Part file 'FBNK.STMT.ENTRY.18', part number 18 - OK
Part file 'FBNK.STMT.ENTRY.19', part number 19 - OK
Part file 'FBNK.STMT.ENTRY.20', part number 20 - OK
Part file 'FBNK.STMT.ENTRY.21', part number 21 - OK
Part file 'FBNK.STMT.ENTRY.22', part number 22 - OK
Part file 'FBNK.STMT.ENTRY.23', part number 23 - OK
Part file 'FBNK.STMT.ENTRY.24', part number 24 - OK
Part file 'FBNK.STMT.ENTRY.25', part number 25 - OK
Part file 'FBNK.STMT.ENTRY.26', part number 26 - OK
Part file 'FBNK.STMT.ENTRY.27', part number 27 - OK
Part file 'FBNK.STMT.ENTRY.28', part number 28 - OK
Part file 'FBNK.STMT.ENTRY.29', part number 29 - OK
Part file 'FBNK.STMT.ENTRY.30', part number 30 - OK
Part file 'FBNK.STMT.ENTRY.31', part number 31 - OK
Part file 'FBNK.STMT.ENTRY.32', part number 32 - OK
jsh tm ~ -->
CT VOC FBNK.STMT.ENTRY...
'FBNK.STMT.ENTRY...' record not found
jsh tm ~ -->
jsh tm ~ -->CT VOC FBNK.STMT.ENTRY
u
FBNK.STMT.ENTRY
001 F
002 ../bnk.data/ac/FBNK.STMT008
003 ../bnk.dict/F.STMT.000]D
Awaiting your response please.
Thank you.
Warm Rgds
Thank for your interest. Here is the result please;
~ -->VERIFY-DISTRIB FBNK.STMT.ENTRY
Partitioning Algorithm is USER Subroutine 'PART.ALGO.STMT'
User subroutine OK.
Part file 'FBNK.STMT.ENTRY.1', part number 1 - OK
Part file 'FBNK.STMT.ENTRY.2', part number 2 - OK
Part file 'FBNK.STMT.ENTRY.3', part number 3 - OK
Part file 'FBNK.STMT.ENTRY.4', part number 4 - OK
Part file 'FBNK.STMT.ENTRY.5', part number 5 - OK
Part file 'FBNK.STMT.ENTRY.6', part number 6 - OK
Part file 'FBNK.STMT.ENTRY.7', part number 7 - OK
Part file 'FBNK.STMT.ENTRY.8', part number 8 - OK
Part file 'FBNK.STMT.ENTRY.9', part number 9 - OK
Part file 'FBNK.STMT.ENTRY.10', part number 10 - OK
Part file 'FBNK.STMT.ENTRY.11', part number 11 - OK
Part file 'FBNK.STMT.ENTRY.12', part number 12 - OK
Part file 'FBNK.STMT.ENTRY.13', part number 13 - OK
Part file 'FBNK.STMT.ENTRY.14', part number 14 - OK
Part file 'FBNK.STMT.ENTRY.15', part number 15 - OK
Part file 'FBNK.STMT.ENTRY.16', part number 16 - OK
Part file 'FBNK.STMT.ENTRY.17', part number 17 - OK
Part file 'FBNK.STMT.ENTRY.18', part number 18 - OK
Part file 'FBNK.STMT.ENTRY.19', part number 19 - OK
Part file 'FBNK.STMT.ENTRY.20', part number 20 - OK
Part file 'FBNK.STMT.ENTRY.21', part number 21 - OK
Part file 'FBNK.STMT.ENTRY.22', part number 22 - OK
Part file 'FBNK.STMT.ENTRY.23', part number 23 - OK
Part file 'FBNK.STMT.ENTRY.24', part number 24 - OK
Part file 'FBNK.STMT.ENTRY.25', part number 25 - OK
Part file 'FBNK.STMT.ENTRY.26', part number 26 - OK
Part file 'FBNK.STMT.ENTRY.27', part number 27 - OK
Part file 'FBNK.STMT.ENTRY.28', part number 28 - OK
Part file 'FBNK.STMT.ENTRY.29', part number 29 - OK
Part file 'FBNK.STMT.ENTRY.30', part number 30 - OK
Part file 'FBNK.STMT.ENTRY.31', part number 31 - OK
Part file 'FBNK.STMT.ENTRY.32', part number 32 - OK
jsh tm ~ -->
CT VOC FBNK.STMT.ENTRY...
'FBNK.STMT.ENTRY...' record not found
jsh tm ~ -->
jsh tm ~ -->CT VOC FBNK.STMT.ENTRY
u
FBNK.STMT.ENTRY
001 F
002 ../bnk.data/ac/FBNK.STMT008
003 ../bnk.dict/F.STMT.000]D
Awaiting your response please.
Thank you.
Warm Rgds
Please Log in or Create an account to join the conversation.
- armin
- Offline
- Elite Member
- “So long - and thanks for all the fish!”
Less
More
- Posts: 300
- Thank you received: 57
12 years 2 months ago #12545
by armin
Replied by armin on topic NOFILE ENQUIRY RETURNED ZERO ON DISTRIBUTED TABLE
Try also :
SELECT VOC LIKE FBNK.STMT.ENTRY...
CT VOC
Did you cut the result of LIST-DISTRIB ??
Does everything work OK when you do a SELECT/LIST from jShell ?
How look the part of your routine ?
SELECT VOC LIKE FBNK.STMT.ENTRY...
CT VOC
Did you cut the result of LIST-DISTRIB ??
Does everything work OK when you do a SELECT/LIST from jShell ?
How look the part of your routine ?
Please Log in or Create an account to join the conversation.
- rsolapade
- Topic Author
- Visitor
12 years 2 months ago #12560
by rsolapade
Replied by rsolapade on topic NOFILE ENQUIRY RETURNED ZERO ON DISTRIBUTED TABLE
Hi,
Thank you for your contribution on the above subject matter.
This is the part of the result of what you requested.
->SELECT VOC LIKE FBNK.STMT.ENTRY...
37 Records selected
>CT VOC
FBNK.STMT.ENTRY.13
001 F
002 ../bnk.data/ac/FBNK.STMT008.13
003 ../bnk.dict/F.STMT.000]D
FBNK.STMT.ENTRY.17
001 F
002 ../bnk.data/ac/FBNK.STMT008.17
003 ../bnk.dict/F.STMT.000]D
FBNK.STMT.ENTRY.31
001 F
002 ../bnk.data/ac/FBNK.STMT008.31
003 ../bnk.dict/F.STMT.000]D
FBNK.STMT.ENTRY.8
001 F
002 ../bnk.data/ac/FBNK.STMT008.8
003 ../bnk.dict/F.STMT.000]D
FBNK.STMT.ENTRY.23
001 F
002 ../bnk.data/ac/FBNK.STMT008.23
003 ../bnk.dict/F.STMT.000]D
FBNK.STMT.ENTRY.4
001 F
002 ../bnk.data/ac/FBNK.STMT008.4
003 ../bnk.dict/F.STMT.000]D
FBNK.STMT.ENTRY.27
001 F
002 ../bnk.data/ac/FBNK.STMT008.27
003 ../bnk.dict/F.STMT.000]D
FBNK.STMT.ENTRY.DETAIL.XREF
001 F CROSSREFERENCE OF DETAILED &ÿCONSOLIDATED STMT.ENTRY
002 ../bnk.data/ac/FBNK.STMT023
003 ../bnk.dict/F.STMT.EN001]D
FBNK.STMT.ENTRY.32
001 F
002 ../bnk.data/ac/FBNK.STMT008.32
003 ../bnk.dict/F.STMT.000]D
And, this is the part of the routine where SELECT statement was used but does NOT select anything.
* Build Main Select Statement
LL.SELECT.COMMAND = "SELECT ":FN.STMT.ENTRY:" BY CURRENCY BY TRANSACTION.CODE WITH"
* Ensure we don't include the AGE.BRACKETS selection criteria in the select statement
* instead use the AGE.BRACKET selection to set the index for which set of aging
* brackets we should use
FOR I = 1 TO LL.S.NUM.CRITERIA
IF LL.S.CRITERIA<I,LL.S.SELECTION> <> "" THEN
IF LL.S.CRITERIA<I,LL.S.SS.FIELD.NAME> EQ "AGE.BRACKETS" THEN
LL.AGE.OPTION = LL.S.CRITERIA<I,LL.S.SELECTION>
END ELSE
LL.SELECT.COMMAND:= " ":LL.S.CRITERIA<I,LL.S.DB.FIELD.NAME>:" ":LL.S.CRITERIA<I,LL.S.OPERAND>:" ":LL.S.CRITERIA<I,LL.S.SELECTION>:" AND"
END
END
NEXT I
* Any fixed selection goes in here
LL.SELECT.COMMAND := " @ID LIKE F... AND VALUE.DATE GE '":TODAY:"' AND"
* Add the types of transactions to select
LL.SELECT.COMMAND := " ("
FOR I = 1 TO LL.NUM.TRAN.TYPE
LL.SELECT.COMMAND := "TRANSACTION.CODE EQ '" : LL.ADD.TRAN.TYPE<I> : "' OR "
NEXT I
LL.SELECT.COMMAND = LEFT(LL.SELECT.COMMAND,LEN(LL.SELECT.COMMAND) - 4)
LL.SELECT.COMMAND := ") AND"
IF RIGHT(LL.SELECT.COMMAND,4) = " AND" THEN
LL.SELECT.COMMAND = LEFT(LL.SELECT.COMMAND,LEN(LL.SELECT.COMMAND) - 4)
END
IF RIGHT(LL.SELECT.COMMAND,5) = " WITH" THEN
LL.SELECT.COMMAND = LEFT(LL.SELECT.COMMAND,LEN(LL.SELECT.COMMAND) - 5)
END
LL.STMT.ID.LIST = ""
LL.STMT.ID.CNT = ""
CALL EB.READLIST(LL.SELECT.COMMAND,LL.STMT.ID.LIST,"",LL.STMT.ID.CNT,"")
Note when you debug and view the content of "LL.STMT.ID.CNT" it shows zero.
What could be the problem and how is the SELECT used in a DISTRIBUTED file.
thanks and my rgds
Thank you for your contribution on the above subject matter.
This is the part of the result of what you requested.
->SELECT VOC LIKE FBNK.STMT.ENTRY...
37 Records selected
>CT VOC
FBNK.STMT.ENTRY.13
001 F
002 ../bnk.data/ac/FBNK.STMT008.13
003 ../bnk.dict/F.STMT.000]D
FBNK.STMT.ENTRY.17
001 F
002 ../bnk.data/ac/FBNK.STMT008.17
003 ../bnk.dict/F.STMT.000]D
FBNK.STMT.ENTRY.31
001 F
002 ../bnk.data/ac/FBNK.STMT008.31
003 ../bnk.dict/F.STMT.000]D
FBNK.STMT.ENTRY.8
001 F
002 ../bnk.data/ac/FBNK.STMT008.8
003 ../bnk.dict/F.STMT.000]D
FBNK.STMT.ENTRY.23
001 F
002 ../bnk.data/ac/FBNK.STMT008.23
003 ../bnk.dict/F.STMT.000]D
FBNK.STMT.ENTRY.4
001 F
002 ../bnk.data/ac/FBNK.STMT008.4
003 ../bnk.dict/F.STMT.000]D
FBNK.STMT.ENTRY.27
001 F
002 ../bnk.data/ac/FBNK.STMT008.27
003 ../bnk.dict/F.STMT.000]D
FBNK.STMT.ENTRY.DETAIL.XREF
001 F CROSSREFERENCE OF DETAILED &ÿCONSOLIDATED STMT.ENTRY
002 ../bnk.data/ac/FBNK.STMT023
003 ../bnk.dict/F.STMT.EN001]D
FBNK.STMT.ENTRY.32
001 F
002 ../bnk.data/ac/FBNK.STMT008.32
003 ../bnk.dict/F.STMT.000]D
And, this is the part of the routine where SELECT statement was used but does NOT select anything.
* Build Main Select Statement
LL.SELECT.COMMAND = "SELECT ":FN.STMT.ENTRY:" BY CURRENCY BY TRANSACTION.CODE WITH"
* Ensure we don't include the AGE.BRACKETS selection criteria in the select statement
* instead use the AGE.BRACKET selection to set the index for which set of aging
* brackets we should use
FOR I = 1 TO LL.S.NUM.CRITERIA
IF LL.S.CRITERIA<I,LL.S.SELECTION> <> "" THEN
IF LL.S.CRITERIA<I,LL.S.SS.FIELD.NAME> EQ "AGE.BRACKETS" THEN
LL.AGE.OPTION = LL.S.CRITERIA<I,LL.S.SELECTION>
END ELSE
LL.SELECT.COMMAND:= " ":LL.S.CRITERIA<I,LL.S.DB.FIELD.NAME>:" ":LL.S.CRITERIA<I,LL.S.OPERAND>:" ":LL.S.CRITERIA<I,LL.S.SELECTION>:" AND"
END
END
NEXT I
* Any fixed selection goes in here
LL.SELECT.COMMAND := " @ID LIKE F... AND VALUE.DATE GE '":TODAY:"' AND"
* Add the types of transactions to select
LL.SELECT.COMMAND := " ("
FOR I = 1 TO LL.NUM.TRAN.TYPE
LL.SELECT.COMMAND := "TRANSACTION.CODE EQ '" : LL.ADD.TRAN.TYPE<I> : "' OR "
NEXT I
LL.SELECT.COMMAND = LEFT(LL.SELECT.COMMAND,LEN(LL.SELECT.COMMAND) - 4)
LL.SELECT.COMMAND := ") AND"
IF RIGHT(LL.SELECT.COMMAND,4) = " AND" THEN
LL.SELECT.COMMAND = LEFT(LL.SELECT.COMMAND,LEN(LL.SELECT.COMMAND) - 4)
END
IF RIGHT(LL.SELECT.COMMAND,5) = " WITH" THEN
LL.SELECT.COMMAND = LEFT(LL.SELECT.COMMAND,LEN(LL.SELECT.COMMAND) - 5)
END
LL.STMT.ID.LIST = ""
LL.STMT.ID.CNT = ""
CALL EB.READLIST(LL.SELECT.COMMAND,LL.STMT.ID.LIST,"",LL.STMT.ID.CNT,"")
Note when you debug and view the content of "LL.STMT.ID.CNT" it shows zero.
What could be the problem and how is the SELECT used in a DISTRIBUTED file.
thanks and my rgds
Please Log in or Create an account to join the conversation.
- armin
- Offline
- Elite Member
- “So long - and thanks for all the fish!”
Less
More
- Posts: 300
- Thank you received: 57
12 years 2 months ago #12564
by armin
Replied by armin on topic NOFILE ENQUIRY RETURNED ZERO ON DISTRIBUTED TABLE
Can't see a potential problem.
But you can check :
- your setting of JEDI_DISTRIB_DEFOPEN
- the return code of EB.READLIST
- if the correct files are found by system using jshow -f
- do you have an INDEX on STMT.ENTRY ?
You haven't mentioned if the SELECT works from jsh (best get the statement out of your routine with debug/display and parse it jsh)
But you can check :
- your setting of JEDI_DISTRIB_DEFOPEN
- the return code of EB.READLIST
- if the correct files are found by system using jshow -f
- do you have an INDEX on STMT.ENTRY ?
You haven't mentioned if the SELECT works from jsh (best get the statement out of your routine with debug/display and parse it jsh)
Please Log in or Create an account to join the conversation.
Time to create page: 0.076 seconds