Discussion:
positioning in key sequenced file
(too old to reply)
njdreams Golda
2022-10-21 17:35:30 UTC
Permalink
Need help,

How we can do the key positioning in FILE_SETKEY_ guardian call when the file is read in reverse.
JShepherd
2022-10-21 17:54:42 UTC
Permalink
Post by njdreams Golda
Need help,
How we can do the key positioning in FILE_SETKEY_ guardian call when the
file is
Post by njdreams Golda
read in reverse.
Guardian Procedure Calls Reference Manual

https://support.hpe.com/hpesc/public/docDisplay?
docLocale=en_US&docId=a00022744en_us


#include "$system.zsysdefs.zsysc"
#include <cextdecs>

#define POSITION_APPROXIMATE 0
#define POSITION_GENERIC 1
#define POSITION_EXACT 2
#define PRIMARY_KEY 0


error = FILE_SETKEY_(fnum, (char *)&key, (short)sizeof(key)
,PRIMARY_KEY
,POSITION_APPROXIMATE
,ZSYS_VAL_SETKEYOPT_READREVERSE
/*, compare length */);
Keith Dick
2022-10-22 04:23:09 UTC
Permalink
Post by njdreams Golda
Post by njdreams Golda
Need help,
How we can do the key positioning in FILE_SETKEY_ guardian call when the
file is
Post by njdreams Golda
read in reverse.
Guardian Procedure Calls Reference Manual
https://support.hpe.com/hpesc/public/docDisplay?
docLocale=en_US&docId=a00022744en_us
#include "$system.zsysdefs.zsysc"
#include <cextdecs>
#define POSITION_APPROXIMATE 0
#define POSITION_GENERIC 1
#define POSITION_EXACT 2
#define PRIMARY_KEY 0
error = FILE_SETKEY_(fnum, (char *)&key, (short)sizeof(key)
,PRIMARY_KEY
,POSITION_APPROXIMATE
,ZSYS_VAL_SETKEYOPT_READREVERSE
/*, compare length */);
Although the link to the Guardian Procedure Calls manual that JShepherd includes currently works, HPE sometimes publishes new versions of a manual that are given different URLs, and sometimes rearranges the document library in other ways.

A way to find a document for the NonStop system that is likely to work for a longer amount of time is to go to this page:

www.hpe.com/info/nonstop-docs

then click on the link for the type of NonStop system (J-series or L-series),
then fill in appropriate keywords for a search to locate the manual you need.

The keywords can be words in the title of the manual or words in the body of the manual.
njdreams Golda
2022-10-24 13:49:30 UTC
Permalink
Post by njdreams Golda
Post by njdreams Golda
Need help,
How we can do the key positioning in FILE_SETKEY_ guardian call when the
file is
Post by njdreams Golda
read in reverse.
Guardian Procedure Calls Reference Manual
https://support.hpe.com/hpesc/public/docDisplay?
docLocale=en_US&docId=a00022744en_us
#include "$system.zsysdefs.zsysc"
#include <cextdecs>
#define POSITION_APPROXIMATE 0
#define POSITION_GENERIC 1
#define POSITION_EXACT 2
#define PRIMARY_KEY 0
error = FILE_SETKEY_(fnum, (char *)&key, (short)sizeof(key)
,PRIMARY_KEY
,POSITION_APPROXIMATE
,ZSYS_VAL_SETKEYOPT_READREVERSE
/*, compare length */);
Can you help me with the value of "ZSYS_VAL_SETKEYOPT_READREVERSE" referred here?
Keith Dick
2022-10-24 14:17:08 UTC
Permalink
Post by njdreams Golda
Post by njdreams Golda
Need help,
How we can do the key positioning in FILE_SETKEY_ guardian call when the
file is
Post by njdreams Golda
read in reverse.
Guardian Procedure Calls Reference Manual
https://support.hpe.com/hpesc/public/docDisplay?
docLocale=en_US&docId=a00022744en_us
#include "$system.zsysdefs.zsysc"
#include <cextdecs>
#define POSITION_APPROXIMATE 0
#define POSITION_GENERIC 1
#define POSITION_EXACT 2
#define PRIMARY_KEY 0
error = FILE_SETKEY_(fnum, (char *)&key, (short)sizeof(key)
,PRIMARY_KEY
,POSITION_APPROXIMATE
,ZSYS_VAL_SETKEYOPT_READREVERSE
/*, compare length */);
Can you help me with the value of "ZSYS_VAL_SETKEYOPT_READREVERSE" referred here?
What kind of help do you want? I believe it is defined in $system.zsysdefs.zsysc, which JShepherd's example code shows to include via the statement:

#include "$system.zsysdefs.zsysc"

If, for some reason, you don't want to use the various declarations provided in zsysc, look in the manual we referenced to find which bit must be turned on in the sixths argument to request positioning for reverse reading.

In addition to looking at the Guardian Procedure Calls manual we referenced, you might need to look at the Enscribe Programming manual to understand better how to use the Enscribe procedure calls (more than the Guardian Procedure Calls manual tells you). You can find the Enscribe Programming manual via the method I mentioned in my previous post.
njdreams Golda
2022-10-25 14:40:42 UTC
Permalink
Post by JShepherd
Post by njdreams Golda
Post by njdreams Golda
Need help,
How we can do the key positioning in FILE_SETKEY_ guardian call when the
file is
Post by njdreams Golda
read in reverse.
Guardian Procedure Calls Reference Manual
https://support.hpe.com/hpesc/public/docDisplay?
docLocale=en_US&docId=a00022744en_us
#include "$system.zsysdefs.zsysc"
#include <cextdecs>
#define POSITION_APPROXIMATE 0
#define POSITION_GENERIC 1
#define POSITION_EXACT 2
#define PRIMARY_KEY 0
error = FILE_SETKEY_(fnum, (char *)&key, (short)sizeof(key)
,PRIMARY_KEY
,POSITION_APPROXIMATE
,ZSYS_VAL_SETKEYOPT_READREVERSE
/*, compare length */);
Can you help me with the value of "ZSYS_VAL_SETKEYOPT_READREVERSE" referred here?
#include "$system.zsysdefs.zsysc"
If, for some reason, you don't want to use the various declarations provided in zsysc, look in the manual we referenced to find which bit must be turned on in the sixths argument to request positioning for reverse reading.
In addition to looking at the Guardian Procedure Calls manual we referenced, you might need to look at the Enscribe Programming manual to understand better how to use the Enscribe procedure calls (more than the Guardian Procedure Calls manual tells you). You can find the Enscribe Programming manual via the method I mentioned in my previous post.
Thanks for all your help .

Can we follow the same for read reverse lookup for alternate key lookup ?
Keith Dick
2022-10-25 15:39:31 UTC
Permalink
Post by njdreams Golda
Post by JShepherd
Post by njdreams Golda
Post by njdreams Golda
Need help,
How we can do the key positioning in FILE_SETKEY_ guardian call when the
file is
Post by njdreams Golda
read in reverse.
Guardian Procedure Calls Reference Manual
https://support.hpe.com/hpesc/public/docDisplay?
docLocale=en_US&docId=a00022744en_us
#include "$system.zsysdefs.zsysc"
#include <cextdecs>
#define POSITION_APPROXIMATE 0
#define POSITION_GENERIC 1
#define POSITION_EXACT 2
#define PRIMARY_KEY 0
error = FILE_SETKEY_(fnum, (char *)&key, (short)sizeof(key)
,PRIMARY_KEY
,POSITION_APPROXIMATE
,ZSYS_VAL_SETKEYOPT_READREVERSE
/*, compare length */);
Can you help me with the value of "ZSYS_VAL_SETKEYOPT_READREVERSE" referred here?
#include "$system.zsysdefs.zsysc"
If, for some reason, you don't want to use the various declarations provided in zsysc, look in the manual we referenced to find which bit must be turned on in the sixths argument to request positioning for reverse reading.
In addition to looking at the Guardian Procedure Calls manual we referenced, you might need to look at the Enscribe Programming manual to understand better how to use the Enscribe procedure calls (more than the Guardian Procedure Calls manual tells you). You can find the Enscribe Programming manual via the method I mentioned in my previous post.
Thanks for all your help .
Can we follow the same for read reverse lookup for alternate key lookup ?
Yes, the same code works for read reverse by an alternate key as long as you pass the alternate key's specifier in the fourth argument of the SET_FILEKEY_ call (and put the alternate key's value and length in the second and third arguments). The alternate key's specifier is the 16-bit value used to identify the alternate key when you create the alternate key. It usually is given as two ASCII characters in FUP commands, but don't specify it that way in the fourth argument to FILE_SETKEY_. The alternate key specifier must be a 16-bit value, not the address of a string.
njdreams Golda
2022-10-27 16:08:51 UTC
Permalink
Post by njdreams Golda
Post by JShepherd
Post by njdreams Golda
Post by njdreams Golda
Need help,
How we can do the key positioning in FILE_SETKEY_ guardian call when the
file is
Post by njdreams Golda
read in reverse.
Guardian Procedure Calls Reference Manual
https://support.hpe.com/hpesc/public/docDisplay?
docLocale=en_US&docId=a00022744en_us
#include "$system.zsysdefs.zsysc"
#include <cextdecs>
#define POSITION_APPROXIMATE 0
#define POSITION_GENERIC 1
#define POSITION_EXACT 2
#define PRIMARY_KEY 0
error = FILE_SETKEY_(fnum, (char *)&key, (short)sizeof(key)
,PRIMARY_KEY
,POSITION_APPROXIMATE
,ZSYS_VAL_SETKEYOPT_READREVERSE
/*, compare length */);
Can you help me with the value of "ZSYS_VAL_SETKEYOPT_READREVERSE" referred here?
#include "$system.zsysdefs.zsysc"
If, for some reason, you don't want to use the various declarations provided in zsysc, look in the manual we referenced to find which bit must be turned on in the sixths argument to request positioning for reverse reading.
In addition to looking at the Guardian Procedure Calls manual we referenced, you might need to look at the Enscribe Programming manual to understand better how to use the Enscribe procedure calls (more than the Guardian Procedure Calls manual tells you). You can find the Enscribe Programming manual via the method I mentioned in my previous post.
Thanks for all your help .
Can we follow the same for read reverse lookup for alternate key lookup ?
Yes, the same code works for read reverse by an alternate key as long as you pass the alternate key's specifier in the fourth argument of the SET_FILEKEY_ call (and put the alternate key's value and length in the second and third arguments). The alternate key's specifier is the 16-bit value used to identify the alternate key when you create the alternate key. It usually is given as two ASCII characters in FUP commands, but don't specify it that way in the fourth argument to FILE_SETKEY_. The alternate key specifier must be a 16-bit value, not the address of a string.
Thank you :)

Loading...