Brian,
Why are you using FOPEN and not the Cobol Open?
regards,
Robert W.Mills
Business Systems Development Analyst
Group Information Systems & Technology
Pinnacle Arvato
DDI: +44 (0)20 8309 3604
-----Original Message-----
From: HP-3000 Systems Discussion [mailto:[log in to unmask]] On
Behalf Of Brian Donaldson
Sent: 04 October 2007 17:43
To: [log in to unmask]
Subject: Re: [HP3000-L] KSAMXL Question/Problem -- Key Info (Continued)
I tried many different things to no avail.
I moved the fopen's parms to the top of the working-storage section,
ensuring all these parms are on an "01" level.
Recompiled and re-ran but no change. Still the same problem (FOPEN fails
with a 187 KSAMXL error code).
So I wrote a quickie simple program to do just the FOPEN's and what do
you know? -- It worked fine doing exactly what I wanted with no errors.
FOPEN in the perm directory. Gives me a 52 error code, (file not found),
so I FOPEN the file as a new file. Works fine. Then I FCLOSE the file in
the perm directory and ouila(!) -- it works perfectly.
So I converted this little mainline into a sub and have my troublesome
mainline call the sub to FOPEN the KSAMXL file.
I did a listf filename,-5 to see if the ksamxl_param was actually being
used to create the KSAMXL file and yes, it worked just fine. The listf
shows all the KSAMXL keyinfo stuff.
Seems to me that this troublesome mainline has some kind of internal
problem going on but I have no idea how to even diagnose it.
Not exactly the solution I was looking for, but at least it works.
Thanks to all who replied.
Brian.
On Wed, 3 Oct 2007 20:44:56 -0400, Brian Donaldson <[log in to unmask]>
wrote:
>Thanks for the info. That helps a lot.
>
>However, my next KSAMXL issue is this --
>
>I built a KSAMXL and have a COBOL program that calls the intrinsic
"FOPEN"
>to open the file thus:
>
>CALL INTRINSIC "FOPEN" USING WS-FILE-NAME
> WS-FOPTIONS
> WS-AOPTIONS
> WS-FIELD-LENGTH
> \\
> WS-KSAMXL-PARAM
> \\ \\ \\ \\
> \\ \\
> WS-FILE-CODE
> GIVING WS-FNUM
>
>This FOPEN is successful if the file exists (using the field
>WS-KSAMXL-PARAM that I build in the source code), but if the file does
not exist the "FOPEN"
fails
>which I would expect. But -- the error code it returns is a 187 (KSAMXL
>Invalid Key Specification).
>
>I was expecting the error code to be a 52 (Nonexistent Perm File)
>
>So why is this intrinsic giving me a KSAMXL error and not a 52 error?
>
>TIA,
>Brian.
>
>
>On Tue, 2 Oct 2007 09:21:36 +0100, Robert Mills
><[log in to unmask]> wrote:
>
>>Brian,
>>
>>From Chapter 2 of the "Using KSAM XL and KSAM 64" manual:
>>
>>"RDUP specifies that each new duplicate key is inserted randomly in
>>the duplicate key chain. RDUP is used if the reuse option is selected.
>>With RDUP, chronological order is not maintained."
>>
>>regards,
>>
>>Robert W.Mills
>>Business Systems Development Analyst
>>Group Information Systems & Technology Pinnacle Arvato
>>DDI: +44 (0)20 8309 3604
>>
>>
>>-----Original Message-----
>>From: HP-3000 Systems Discussion [mailto:[log in to unmask]] On
>>Behalf Of Brian Donaldson
>>Sent: 02 October 2007 04:06
>>To: [log in to unmask]
>>Subject: [HP3000-L] KSAMXL Question/Problem -- Key Info
>>
>>I built this file thus:
>>
>>:BUILD HOLDIT9;REC=-22,,F,ASCII;DISC=55;KSAMXL;KEY=(B,1,4,DUP;B,8,4,
>>DUP;B,13,2;B,22,1);REUSE;OPTMBLK
>>
>>I was expecting two dup keys (not RDUP keys) on the listf of the file
>>but it shows the file with RDUP keys?
>>
>>Why random dups keys instead of plain old dup keys?
>>
>>TIA,
>>Brian Donaldson.
>>
>>:LISTF HOLDIT9,-5
>>********************
>>FILE: HOLDIT9.PUB.DEV
>>
>>FILE CODE : 0 FOPTIONS: ASCII,FIXED,NOCCTL,KSAMXL
>>BLK FACTOR: 146 CREATOR :
>>REC SIZE: 22(BYTES) LOCKWORD:
>>BLK SIZE: 4096(BYTES) SECURITY--READ : ANY
>>EXT SIZE: 0(SECT) WRITE : ANY
>>NUM REC: 0 APPEND : ANY
>>NUM SEC: 224 LOCK : ANY
>>NUM EXT: 2 EXECUTE : ANY
>>MAX REC: 63 **SECURITY IS ON
>> FLAGS : NO ACCESSORS
>>NUM LABELS: 0 CREATED : MON, OCT 1, 2007, 7:40 PM
>>MAX LABELS: 0 MODIFIED: MON, OCT 1, 2007, 7:40 PM
>>DISC DEV #: 4 ACCESSED: MON, OCT 1, 2007, 7:40 PM
>>SEC OFFSET: 0 LABEL ADDR: $00000063.$0008FA20
>>VOLCLASS : MPEXL_SYSTEM_VOLUME_SET:DISC
>>
>>KEY KEY TYPE KEY LOCATION KEY SIZE DUP/RDUP
>>--- -------- ------------ -------- --------
>> 1 BYTE 1 4 RDUP
>> 2 BYTE 8 4 RDUP
>> 3 BYTE 13 2 NONE
>> 4 BYTE 22 1 NONE
>>
>>NUM KSAM KEYS: 4 FIRST KSAM RECORD: 0
>>LANGUAGE : NATIVE-3000 REUSE RECORD : YES
>>PRIMARY KEY : RANDOM COMPUTE BLK SIZE :
>>OPTMBLK
>>VERSION : 2 DATA BLOCK SIZE : 4096
>>
>>* 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 *
>
>* 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 *
======================================================
Test Text
======================================================
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|