Skip to main content

[Migrated content. Thread originally posted on 22 November 2004]

I am loking for the Number of Keys in some vision 4 Files.

I tried it with the i$io - routine like this:

SET INFO-FUNCTION TO TRUE.
SET GET-LOGICAL-PARAMS to true.
CALL "I$IO" USING IO-FUNCTION, FILE-HANDLE,
INFO-MODE,
LOGICAL-INFO.
IF E-NO-SUPPORT
* do something
else
move num-keys to my-key-count
end-if.

But .. the answer is always "1".
(Of course did i open the file .. i only cutted these few lines out off the source .. other calls work very well)

Does anyone know what is wrong?


i tried a workaround like this:
SET INFO-FUNCTION TO TRUE.
initialize key-info.
perform with test after varying i from 1 by 1 until i = 15
or key-info(1:2) not numeric
or key-info(1:2) = zero
move i to info-mode
initialize key-info
call "c$sleep" using 1
CALL "I$IO" USING IO-FUNCTION, FILE-HANDLE,
INFO-MODE,
key-INFO
end-perform.
move i to my-key-count.

I works .. but only with the "c$sleep" call .. which cost me a second per key. Without "c$sleep" i always get 15.

I would prefer the first way .. if i could get it to work.:confused:


EDIT: I am using version 5.2.1

[Migrated content. Thread originally posted on 22 November 2004]

I am loking for the Number of Keys in some vision 4 Files.

I tried it with the i$io - routine like this:

SET INFO-FUNCTION TO TRUE.
SET GET-LOGICAL-PARAMS to true.
CALL "I$IO" USING IO-FUNCTION, FILE-HANDLE,
INFO-MODE,
LOGICAL-INFO.
IF E-NO-SUPPORT
* do something
else
move num-keys to my-key-count
end-if.

But .. the answer is always "1".
(Of course did i open the file .. i only cutted these few lines out off the source .. other calls work very well)

Does anyone know what is wrong?


i tried a workaround like this:
SET INFO-FUNCTION TO TRUE.
initialize key-info.
perform with test after varying i from 1 by 1 until i = 15
or key-info(1:2) not numeric
or key-info(1:2) = zero
move i to info-mode
initialize key-info
call "c$sleep" using 1
CALL "I$IO" USING IO-FUNCTION, FILE-HANDLE,
INFO-MODE,
key-INFO
end-perform.
move i to my-key-count.

I works .. but only with the "c$sleep" call .. which cost me a second per key. Without "c$sleep" i always get 15.

I would prefer the first way .. if i could get it to work.:confused:


EDIT: I am using version 5.2.1
SilverHH,

Are you using your own copy of the filesys.def?

If so, this changed with version 5.x and the logical info is now as follows:

01 LOGICAL-INFO.
03 MAX-REC-SIZE PIC 9(10).
03 L-COMMA-1 PIC X VALUE ",".
03 MIN-REC-SIZE PIC 9(10).
03 L-COMMA-2 PIC X VALUE ",".
03 NUM-KEYS PIC 9(3).
03 L-END PIC X VALUE LOW-VALUES.

As you can see, the min and max record sizes have increased from PIC 9(5) to PIC 9(10).

The new I$IO routine is supposed to be able to determine the size of the LOGICAL-INFO that is passed to it, but maybe it is not doing that properly.

I would suggest you replace your own copy of filesys.def with one from the current version of your runtime (its in the "samples/def" sub-directory.

Let me know if this fixes your problem.

[Migrated content. Thread originally posted on 22 November 2004]

I am loking for the Number of Keys in some vision 4 Files.

I tried it with the i$io - routine like this:

SET INFO-FUNCTION TO TRUE.
SET GET-LOGICAL-PARAMS to true.
CALL "I$IO" USING IO-FUNCTION, FILE-HANDLE,
INFO-MODE,
LOGICAL-INFO.
IF E-NO-SUPPORT
* do something
else
move num-keys to my-key-count
end-if.

But .. the answer is always "1".
(Of course did i open the file .. i only cutted these few lines out off the source .. other calls work very well)

Does anyone know what is wrong?


i tried a workaround like this:
SET INFO-FUNCTION TO TRUE.
initialize key-info.
perform with test after varying i from 1 by 1 until i = 15
or key-info(1:2) not numeric
or key-info(1:2) = zero
move i to info-mode
initialize key-info
call "c$sleep" using 1
CALL "I$IO" USING IO-FUNCTION, FILE-HANDLE,
INFO-MODE,
key-INFO
end-perform.
move i to my-key-count.

I works .. but only with the "c$sleep" call .. which cost me a second per key. Without "c$sleep" i always get 15.

I would prefer the first way .. if i could get it to work.:confused:


EDIT: I am using version 5.2.1
I?m using this filesys.def:
* $Id: filesys.def,v 1.25.2.2 2002/10/22 14:56:56 mark Exp $

And the logical-info is the same as you described


So thanks for your help, but the problem must be something else.


EDIT:
Found it.
i have to use the "old" logical-info.
the 10,10,3 is from the version 6.1 filesys.def

if i use the 5.2 .def it is 5,5,3 and it works ...


strange thing is only the "get-deleted-count" value is not available .. but it has worked with the "wrong" .def .. strange, but unimportant. (i simply add it by my self)

so thanks for the tip. it finally led me to the right way :D

[Migrated content. Thread originally posted on 22 November 2004]

I am loking for the Number of Keys in some vision 4 Files.

I tried it with the i$io - routine like this:

SET INFO-FUNCTION TO TRUE.
SET GET-LOGICAL-PARAMS to true.
CALL "I$IO" USING IO-FUNCTION, FILE-HANDLE,
INFO-MODE,
LOGICAL-INFO.
IF E-NO-SUPPORT
* do something
else
move num-keys to my-key-count
end-if.

But .. the answer is always "1".
(Of course did i open the file .. i only cutted these few lines out off the source .. other calls work very well)

Does anyone know what is wrong?


i tried a workaround like this:
SET INFO-FUNCTION TO TRUE.
initialize key-info.
perform with test after varying i from 1 by 1 until i = 15
or key-info(1:2) not numeric
or key-info(1:2) = zero
move i to info-mode
initialize key-info
call "c$sleep" using 1
CALL "I$IO" USING IO-FUNCTION, FILE-HANDLE,
INFO-MODE,
key-INFO
end-perform.
move i to my-key-count.

I works .. but only with the "c$sleep" call .. which cost me a second per key. Without "c$sleep" i always get 15.

I would prefer the first way .. if i could get it to work.:confused:


EDIT: I am using version 5.2.1
I?m using this filesys.def:
* $Id: filesys.def,v 1.25.2.2 2002/10/22 14:56:56 mark Exp $

And the logical-info is the same as you described


So thanks for your help, but the problem must be something else.


EDIT:
Found it.
i have to use the "old" logical-info.
the 10,10,3 is from the version 6.1 filesys.def

if i use the 5.2 .def it is 5,5,3 and it works ...


strange thing is only the "get-deleted-count" value is not available .. but it has worked with the "wrong" .def .. strange, but unimportant. (i simply add it by my self)

so thanks for the tip. it finally led me to the right way :D

[Migrated content. Thread originally posted on 22 November 2004]

I am loking for the Number of Keys in some vision 4 Files.

I tried it with the i$io - routine like this:

SET INFO-FUNCTION TO TRUE.
SET GET-LOGICAL-PARAMS to true.
CALL "I$IO" USING IO-FUNCTION, FILE-HANDLE,
INFO-MODE,
LOGICAL-INFO.
IF E-NO-SUPPORT
* do something
else
move num-keys to my-key-count
end-if.

But .. the answer is always "1".
(Of course did i open the file .. i only cutted these few lines out off the source .. other calls work very well)

Does anyone know what is wrong?


i tried a workaround like this:
SET INFO-FUNCTION TO TRUE.
initialize key-info.
perform with test after varying i from 1 by 1 until i = 15
or key-info(1:2) not numeric
or key-info(1:2) = zero
move i to info-mode
initialize key-info
call "c$sleep" using 1
CALL "I$IO" USING IO-FUNCTION, FILE-HANDLE,
INFO-MODE,
key-INFO
end-perform.
move i to my-key-count.

I works .. but only with the "c$sleep" call .. which cost me a second per key. Without "c$sleep" i always get 15.

I would prefer the first way .. if i could get it to work.:confused:


EDIT: I am using version 5.2.1
I?m using this filesys.def:
* $Id: filesys.def,v 1.25.2.2 2002/10/22 14:56:56 mark Exp $

And the logical-info is the same as you described


So thanks for your help, but the problem must be something else.


EDIT:
Found it.
i have to use the "old" logical-info.
the 10,10,3 is from the version 6.1 filesys.def

if i use the 5.2 .def it is 5,5,3 and it works ...


strange thing is only the "get-deleted-count" value is not available .. but it has worked with the "wrong" .def .. strange, but unimportant. (i simply add it by my self)

so thanks for the tip. it finally led me to the right way :D