CONCATENATING in DDS

250 pts.
Tags:
CLLP
DDS
RPGLE
Can you concatenate 2 fields in DDS which were created using the substring command?
1

Answer Wiki

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

I keep getting an error when I try to post my answer in the discussion are so I will try to post it here.

You must do this in the DDS for the LF. Both the original fields and your new one must be defined. Here is and example:

PSEFMO                                                        
PSEFYR                                                        
PSEXCT                                                        
PSEXDA                                                        
PSEXDH  CONCAT(PSEXCT PSEXYR PSEXMO PSEXDA) 

Hope this helps. If not, Let us know.

Discuss This Question: 4  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.
  • CharlieBrowne

    I do not understand what you are trying to do.

    Sounds like you have two values and concatenate them into one field and store it in a PF. If the is the case, you just have a field in the file that is the length of the concatenated value.

    If I am misunderstanding you, please give us more information.

    62,385 pointsBadges:
    report
  • GHENDER
    I have field A in a file and it is 17 positions long. The 1st 7 positions of this field is my order number so I do a substring of the 1st 7 positions and call it ORDER. My line number is contained in the last 3 positions of field B so I do a substring of the last 3 postions and call it LINE.

    I was hoping I could concatenate field ORDER with field LINE and create a field call ORDRLIN.

    Whenever I try to do the concatenation, it says fields ORDER and LINE do not exist.  
    250 pointsBadges:
    report
  • ToddN2000
    I have seen the new fields defined in LF as well. We have a few PF where the date is split up into separate fields MM, DD, YY. The LF over this have the date complete as a 6 digit field MMDDYY.
    135,295 pointsBadges:
    report
  • CharlieBrowne
    Look at the answer box for a sample of how to code this
    62,385 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.

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

Following

Share this item with your network: