Synon/2E, Physical Files

15 pts.
Tags:
Physical File
Synon/2E
Physical File has RRN as Key. but is this RRN is always Assending or somehow we can make it descending also??

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hi

go to your key and say descending

Discuss This Question: 3  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    Can you explain what you mean when you say "Physical File has RRN as Key"? Is RRN the name of a field in the file? Or are you simply retrieving records by relative record number? How are you accessing the file? Native I/O? Or SQL? I see it's "Synon", but you should still know the underlying access methods. Tom
    125,585 pointsBadges:
    report
  • MurrayInfoSys
    Sharmak - RRN is a very old tern in the computer world. This was the initial way to get to a specific record for flat files. Before Keys were invented. I'm not sure of Synon use of the term. Records are accessed based on their ordinal position in the file (relative record number, RRN). For example, the desired record to be accessed might be the 42nd record in the file out of 999 total. Phil
    940 pointsBadges:
    report
  • Splat
    RRN access is something I've been using in maintenance programs for ages - never have to worry about getting the wrong record when there are duplicate keys (don't get me started on the UNIQUE keyword). I use a logical to present the data in the order that I want it displayed, but all adds/changes/deletes are done through the physical.
    FLglFile   If   e           k Disk    rename(format: logical)
    F                                     infds(logical_d1)        
    FPhyFile   Uf a e             Disk                             
    
    D Logical_d1      Ds                 
    D  frn1                 397    400b 0
    The relative record number comes in via the INFDS & is stored in a hidden field in the front-end subfile.
    Chain(e) (Frn1sv) Format;
    Chaining by relative record number is a random access method, as is chaining by key value, so there's nothing in RPG preventing you from accessing the file in a descending sequence. Just don't be surprised if the order it processes in doesn't follow the keyed sequence - especially if REUSEDLT(*YES) is specified.
    7,625 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following