Sequentially Retreiving an Indexed file in the order they wereinserted

Joe Boyle joeboyle_adt at hotmail.com
Tue May 2 12:51:54 CDT 2006


Sequentially Retreiving an Indexed file in the order they were insertedI always thought that RMS returned records in that way by default, so unless you are referencing an index via a choose - and it could be that qtp and quiz use the primary automatically when there is no choose - I would guess that it would open the first data bucket and read through the bucket chain to the end of the file, although you would normally get bucket splits over time so that might present a problem. 

Have you actually confirmed that the primary index is being used ?

You could always output to disc file and compare a 'access filename' run with a 'access filename;choose viaindex primarykey' run, and then use diff to compare them.
  ----- Original Message ----- 
  From: Tremblay.Pierre-McLeod at hydro.qc.ca 
  To: powerh-l at lists.sowder.com 
  Sent: Tuesday, May 02, 2006 5:27 PM
  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 






------------------------------------------------------------------------------


  -- 
  = = = = = = = = = = = = = = = = = = = = = = = = = = = =
  Mailing list: powerh-l at lists.sowder.com
  Subscribe: "subscribe" in message body to powerh-l-request at lists.sowder.com
  Unsubscribe: "unsubscribe <password>" in message body to powerh-l-request at lists.sowder.com
  http://lists.sowder.com/mailman/listinfo/powerh-l
  This list is closed, thus to post to the list you must be a subscriber.
  Add 'site:lists.sowder.com powerh-l' to your search terms to search the list archive at Google.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.sowder.com/pipermail/powerh-l/attachments/20060502/77bbd031/attachment.html


More information about the powerh-l mailing list