HP3000-L Archives

November 2004, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Brian Donaldson <[log in to unmask]>
Reply To:
Brian Donaldson <[log in to unmask]>
Date:
Wed, 10 Nov 2004 20:46:04 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (86 lines)
Thanks for the reply to my posting.

However, this isn't the working storage definition required for the
FGETKEYINFO intrinsic.

The "Using KSAMXL" manual gives what I need on page 2-12, 9-36 and 9-37.

However, the code for what I need (on page 2-12) is written in Pascal,
not Cobol.

So it looks like I will probably have to code a subroutine in Pascal to
do what I want and call the MPEiX intrinsic FGETKEYINFO.

Thanks for your help,
Brian.

On Wed, 10 Nov 2004 18:43:14 -0600, Matthew Perdue
<[log in to unmask]> wrote:

>Brian Donaldson <[log in to unmask]> wrote:
>
>>Does anyone have a *COBOL* working-storage definition for the KSAMXL
>param giving the key info structure) ?
>>
>>If so, would you mind passing on a copy to me before I have to go
>write my own ? :-)
>>
>>TIA,
>>Brian Donaldson.
>
>Certainly:
>
>001100 01 KSAM-STATUS.
>001200    05 STATUS-KEY-1                PIC  X.
>001300    05 STATUS-KEY-2                PIC  X.
>001400 01 STATUS-KEY REDEFINES KSAM-STATUS PIC X(2).
>001500    88 KSAM-SUCCESSFUL                        VALUE "00".
>001600    88 KSAM-SUCCESS-WITH-DUP                  VALUE "02".
>001700    88 KSAM-AT-END                            VALUE "10".
>001800    88 KSAM-NO-RECORD                         VALUE "23".
>001900    88 KSAM-EOF-ON-WRITE                      VALUE "24".
>002000    88 KSAM-LOCK-DENIED                       VALUE "30".
>002100    88 KSAM-UNLOCK-DENIED                     VALUE "31".
>002200
>002300 01 KSAM-RELOP                     PIC S9(4)  COMP VALUE 2.
>002400 77 KSAM-RESULT                    PIC  9(4).
>002500 01 KEY-LOCATION                   PIC S9(4)  COMP VALUE 3.
>002600*01 KEY-LENGTH                     PIC S9(4)  COMP VALUE 40.
>002700*01 KEY-VALUE                      PIC  X(40).
>002800 01 LOCK-CONDITION                 PIC S9(4)  COMP VALUE 1.
>002900 01 KSAM-ABORT-MSG                 PIC  X(60) VALUE SPACES.
>003000
>003100 77 NAME-RESULT                    PIC  9(4).
>003200 77 NAME-SIZE                      PIC S9(4)  COMP VALUE 56.
>003300 77 NAME-KEY-LENGTH                PIC S9(4)  COMP VALUE 40.
>003400 77 NAME-KEY-VALUE                 PIC  X(40).
>003500 01 NAME-TABLE.
>003600    05 KSAM-FILE-NUMBER            PIC S9(4)  COMP VALUE 0.
>003700    05 KSAM-FILENAME               PIC  X(8)  VALUE "NAME".
>003800    05 KSAM-I-O                    PIC S9(4)  COMP VALUE 2.
>003900    05 KSAM-ACCESS                 PIC S9(4)  COMP VALUE 2.
>004000    05 KSAM-PREVIOUS               PIC S9(4)  COMP VALUE 0.
>004100 01 CNAME-TABLE.
>004200    05 KSAM-FILE-NUMBER            PIC S9(4)  COMP VALUE 0.
>004300    05 KSAM-FILENAME               PIC  X(8)  VALUE "CNAME".
>004400    05 KSAM-I-O                    PIC S9(4)  COMP VALUE 2.
>004500    05 KSAM-ACCESS                 PIC S9(4)  COMP VALUE 2.
>004600    05 KSAM-PREVIOUS               PIC S9(4)  COMP VALUE 0.
>004700 01 NAMEKSAM-RECORD.
>004800    05 DELETE-MARKER               PIC  X(2)  VALUE SPACES.
>004900    05 NAMEKSAM-CUST-NAME          PIC  X(40).
>005000    05 NAMEKSAM-CUST-ID            PIC  X(14).
>
>Some comments:
>KSAMXL files don't like file names such as NAME.DATA, so you have to
>take care of that with a file equation before your program runs. The
>files NAME and CNAME are for name index and closed account name index
>files. Remember your first key position starts AFTER the two bytes at
>the start of the record, so your key position starts at 3.
>
>* To join/leave the list, search archives, change list settings, *
>* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2