Search argument for SETLL

100 pts.
Tags:
AS/400
RPG ILE
SETLL
Hi! I have LF files to order addresses by: - name, city, state - city, name, state - e-mail, name, city, state. Search is made by typing some characters for name/city/e-mail. As LF-keys have different lengths, I indicate as search argument for the SETLL op-code a field whose length equals the one of the key. The compiler gives me an RNF7055 error. What am I doing wrong? TIA for any help. Arnaldo

Answer Wiki

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

Discuss This Question: 6  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
  • philpl1jb

    The keyfield or keylist for a logical file must match the structure of the key of a logical file but it doesn't need to include all the fields in the key.

    If you have a logicals with keys K1 20A, K2 10A, K3 5A

    You could use a 20A field for the setll or a keylist of fields 20A, 10A or a keylist of fields of 20A, 10A and 5A.  But you cannot use a field of 35A

     

    50,205 pointsBadges:
    report
  • TomLiotta

    I indicate as search argument for the SETLL op-code a field whose length equals the one of the key.

    Length of which key? The way you wrote your question, it seems that you have a "compound" key made up of different columns. And it seems likely that the different columns have different lengths.

    If that's true, then you probably can't use a single field as the SETLL search argument for different LFs. A single field would work only if it matched the length of the first key column for each LF.

    Tom

    125,585 pointsBadges:
    report
  • CharlieBrowne
    If you need to access the data in a way RPG will not allow you to, you can use SQL to retrieve your data set.
    41,380 pointsBadges:
    report
  • argasoft
    Hi and thanks for all answers.

    I'm approaching RPG ILE coming from S36 and RPGII (and no programming for years) where you could use a field having the same length of the logical view (now LF) key (K1+K2+K3) and use it for SETLL without defining via KLIST/KFLD (op-code not present in RPGII).

    I thought that, having defined in a DDS the keys of the LF, it could work the same way as sistem knows LF's total key length.

    Ok, just more stuff to write.

    Thanks again
    Arnaldo
    100 pointsBadges:
    report
  • argasoft
    Hi!

    Rewrote following your infos, but I'm still getting RFN7055 error. This is the situation:
    - LF1 with K1 (surname) 30A, K2 (name) 30A, K3 (city), K4 (state) 2A
    - in LF1 DDS all PF fields are listed, then the named keys in the said order
    - LF compile OK
    - search criteria in LKSURNAME (30A, input only) of externally defined display file
    - display file compile OK
    - display record names listed by compiler properly ("search display" included)
    - FLF1 IF   E             DISK     in file definition specs
    - no input specs for LF1 as I will list using the primary key read (I hope as it's defined in the LF-DDS) in the LF to CHAIN the PF record

    Following -phipl1jb-,  LKSURNAME  SETLL  LF1  is accepted: why is this still RFN7055?

    I tried also these calculations:
                      MOVEL     *BLANKS       BLANK30          30
                      MOVEL     *BLANKS       BLANK02            2
                      MOVEL     *BLANKS       BLANK03            3
    KEYLF1     KLIST                                     
                      KFLD                              LKSURNAME        
                      KFLD                              BLANK30           
                      KFLD                              BLANK30           
                      KFLD                              BLANK02           
    KEYLF1     SETLL     ANAGRAF01

    and, otherwise I wouldn't be here writing, still RFN7055.

    Apologize for bothering with such a basic question.

    Thanks for any advice.
    Arnaldo
    My head is not anymore as it used to be, and that's an aching fact.
    100 pointsBadges:
    report
  • argasoft
    Ops, found what was the problem:
    "K" missing at pos 34 of the "F" spec.

    Sorry and thanks for your time.
    Arnaldo
    100 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