CPYFRMIMPF command Query

2505 pts.
Tags:
AS/400
CPYFRMIMPF
I am trying to import a CSV data into a physical file. There is a column for date in the CSV file of length 8 and Type numeric. It has value 11012013. File1 has the date field declared as (8,0). After the import, the date appears as 11,012,013. I don't want these commas. Why it is happening like this? My command is like this CPYFRMIMPF FROMSTMF(&FROMPATH) TOFILE(QTEMP/File1) + MBROPT(*REPLACE) RCDDLM(*LF) STRDLM('"') + STRESCCHR(*NONE) FROMRCD(2) + RPLNULLVAL(*FLDDFT)

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: 2  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
    There is a column for date in the CSV file of length 8 and Type numeric.   Is it clear to you that even though the column is for date, it is not a "DATE"?   After the import, the date appears as 11,012,013. I dont want these commas. Why it is happening like this?   It happens like that because it is not a date. It's just a numeric value; and numeric values are commonly presented with separators. The separators are inserted by whatever you're using to view the value. The commas are not stored in the value. They only show up because your display file or your report format or whatever you're using is inserting the commas.   If you would use an actual DATE field to store dates instead of trying to use a numeric column, the problem wouldn't appear. But you might not have a choice in that.   If you don't want commas, use a different edit code to present the value. I can't tell you how, because you haven't said what you are using to view the value.   Tom
    125,585 pointsBadges:
    report
  • Splat
    Are you using RUNQRY to view the incoming data?  It often displays numeric data with extraneous commas - it's just default formatting.As Tom noted, the (8,0) numeric field is not a DATE field so don't expect to see the contents laid out as if it was.
    6,795 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