Read comma delimited file in RPGLE program

30 pts.
Tags:
RPGLE Program
Can I read comma delimited file in a RPGLE program?

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.

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.
  • philpl1jb
    I would take a look at CPYFRMIMPF which can copy a , delimited file to a db2 file.
    53,910 pointsBadges:
    report
  • CharlieBrowne

    Yes, you would just store the current position you are at in the record, then %Scan for the next comma. By subtracting the two values you can determine the length of the field. Then using %Substring, you can use the data.

    You would need to know what to expect in the csv file.

    I think it would be easier to just  use CPYTOIMPF

    55,520 pointsBadges:
    report
  • rajeshece
    Using Read Opcode u can read file. Using %SCAN, we can take the required values
    1,215 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: