Please enable JavaScript to view this site.
This program will allow you to pass up to 5 key fields in PARM1 - 5 and then return a Unique Key for these back in PARM1.
Note: You may need to upgrade your Cobwebb Server software to use this program - from version 6.2.24.
*FIRST Call
To reset the Unique Keys i.e clear the Unique keys file and reset the Unique Key counter, use the *FIRST call which has the following parameters.
You should have at least one, but usually only one, *FIRST call in your PPD file.
Parameter |
In |
Len |
Out |
Len |
Comments |
PARM1 |
- |
|
- |
|
|
PARM2 |
- |
|
- |
|
|
PARM3 |
- |
|
- |
|
|
PARM4 |
- |
|
- |
|
|
PARM5 |
- |
|
- |
|
|
PARM6 |
*FIRST |
7 |
- |
|
This should be called when you wish to reset the Unique Keys, usually inside a Page = *FIRST condition. |
*KEY Call
To return a Unique Key for your supplied parameters you would use the *KEY call which has the following parameters.
You may have as many *KEY calls in your PPD file as you like. Note: If the same key fields are passed more than once then the same Unique Key will be returned.
Parameter |
In |
Len |
Out |
Len |
Comments |
PARM1 |
Key Field 1 |
132 |
Unique Key |
7 |
The Unique Key is returned in the format "0000001" |
PARM2 |
Key Field 2 |
132 |
*FOUND |
|
This will be blank if the record was not found or *FOUND if it was (from v6.2.78). |
PARM3 |
Key Field 3 |
132 |
- |
|
|
PARM4 |
Key Field 4 |
132 |
- |
|
|
PARM5 |
Key Field 5 |
132 |
- |
|
|
PARM6 |
*KEY |
7 |
- |
|
|
*LAST Call
To Clear and Close the file and program you need to use the *LAST call which has the following parameters.
You should have at least one, but usually only one, *LAST call in your PPD file.
Parameter |
In |
Len |
Out |
Len |
Comment |
PARM1 |
|
Highest Unique Key generated |
7 |
This value is returned with leading zeros removed. [Later versions of the Server software only] |
|
PARM2 |
|
- |
|
||
PARM3 |
|
- |
|
||
PARM4 |
|
- |
|
||
PARM5 |
|
- |
|
||
PARM6 |
*LAST |
7 |
- |
|
Called when you have finished to clear and close the Unique Keys file, usually inside a Page = *LAST condition. |