Sequentially Retreiving an Indexed file in the order they wereinserted

Guy Werry guy.werry at hbms.ca
Tue May 2 11:47:04 CDT 2006


Pierre,
 
I'm working from HP-Ux knowledge here, but this should be similar to what happens under RMS.
 
In C-ISAM Powerhouse will always follow the primary index.  About the only way to do what you want is to:

1.	Have a sequential file that is not indexed
2.	Set an index on your indexed file that will capture the order of insert: for example, a time stamp, YYYYMMDD:HHSS.
3.	If you have a timestamp that's not an index then you can SORT on that timestamp ... performance suffers, but it will work.

Hope that helps!
 
Guy L. Werry
Senior Systems Analyst
Hudson Bay Mining & Smelting Co., Limited. 

-----Original Message-----
From: powerh-l-bounces+guy.werry=hbms.ca at lists.sowder.com [mailto:powerh-l-bounces+guy.werry=hbms.ca at lists.sowder.com]On Behalf Of Tremblay.Pierre-McLeod at hydro.qc.ca
Sent: Tuesday, May 02, 2006 11:27 AM
To: powerh-l at lists.sowder.com
Subject: Sequentially Retreiving an Indexed file in the order they wereinserted



Hi All, 

I'm searching for a way to sequentially retreive records of an indexed file.  

I want to retreive the records in the order they were inserted regardless of the primary index. 

Using SELECT instead of CHOOSE don't do the job. 
We use 7.10.E 
with OpenVMS V6.2 on Vax. 

I fear that the RMS organization forces usage of the primary index if none mentionned. 

I tried to read the file in VMSBasic without mentionning any index but the primary is still used anyway. 

The FDL of the file is at the end of this mail. 

Thanks for your help. 

Regards 

                                                                         
Pierre McLeod Tremblay 
Consultant T.I. / I.T. Consultant 
pmcleod at videotron.ca 
819.263.0791 fax: 819.263.0792 
                     cell: 819.692.6666 

Chez Hydro: 
tremblay.pierre-mcleod at hydro.qc.ca 
819.298.2943 poste 7411 




== FDL ============================ 
SYSTEM 
        SOURCE                  VAX/VMS 

FILE 
        ALLOCATION              2490 
        BEST_TRY_CONTIGUOUS     yes 
        BUCKET_SIZE             2 
        CLUSTER_SIZE            3 
        CONTIGUOUS              no 
        EXTENSION               0 
        FILE_MONITORING         no 
        GLOBAL_BUFFER_COUNT     0 
        NAME                    "DISK$_RADAPP_:[TDRPROD1.DAT]TDR15.DAT;24" 
        ORGANIZATION            indexed 
        OWNER                   [50,177774] 
        PROTECTION              (system:RWED, owner:RWED, group:RW, world:RW) 

RECORD 
        BLOCK_SPAN              yes 
        CARRIAGE_CONTROL        carriage_return 
        FORMAT                  fixed 
        SIZE                    100 

AREA 0 
        ALLOCATION              2490 
        BEST_TRY_CONTIGUOUS     yes 
        BUCKET_SIZE             2 
        CONTIGUOUS              yes 
        EXTENSION               0 

KEY 0 
        CHANGES                 no 
        DATA_KEY_COMPRESSION    yes 
        DATA_RECORD_COMPRESSION yes 
        DATA_AREA               0 
        DATA_FILL               100 
        DUPLICATES              no 
        INDEX_AREA              0 
        INDEX_COMPRESSION       yes 
        INDEX_FILL              100 
        LEVEL1_INDEX_AREA       0 
        NAME                    "D_REJET" 
        NULL_KEY                no 
        PROLOG                  3 
        SEG0_LENGTH             8 
        SEG0_POSITION           0 
        TYPE                    dstring 

KEY 1 
        CHANGES                 yes 
        DATA_KEY_COMPRESSION    yes 
        DATA_AREA               0 
        DATA_FILL               100 
        DUPLICATES              yes 
        INDEX_AREA              0 
        INDEX_COMPRESSION       yes 
        INDEX_FILL              100 
        LEVEL1_INDEX_AREA       0 
        NAME                    "ANNEE_PERIODE" 
        NULL_KEY                no 
        SEG0_LENGTH             6 
        SEG0_POSITION           80 
        SEG1_LENGTH             2 
        SEG1_POSITION           86 
        TYPE                    dstring 

KEY 2 
        CHANGES                 yes 
        DATA_KEY_COMPRESSION    yes 
        DATA_AREA               0 
        DATA_FILL               100 
        DUPLICATES              yes 
        INDEX_AREA              0 
        INDEX_COMPRESSION       yes 
        INDEX_FILL              100 
        LEVEL1_INDEX_AREA       0 
        NAME                    "D_RAP_QUOTIDIEN" 
        NULL_KEY                no 
        SEG0_LENGTH             8 
        SEG0_POSITION           45 
        TYPE                    dstring 



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.sowder.com/pipermail/powerh-l/attachments/20060502/51fd58d3/attachment.htm


More information about the powerh-l mailing list