CPYTOIMPF –FLDDLM(*TAB) QUESTION

5 pts.
Tags:
CPYTOIMPF
DB2
DB2 Physical File
V5R4
Our OS is V5R4. I am using cpytoimpf to import .txt file (tab delimited) to DB2 physical file. If I remove the FLDDLM(*TAB), I get all the records but the fields have overlapped data. If I use the (*TAB) I get one record and errors on the remaining copy.(error code 7) Here is the command I am using. CPYFRMIMPF FROMSTMF('//CCGUPLOADS/corepcompm.txt') TOFILE(PURLIN/EPCOMPM) MBROPT(*REPLACE) RCDDLM(*CRLF) STRDLM(*NONE) RMVBLANK(*NONE) FLDDLM(*TAB) RPLNULLVAL(*FLDDFT) I am relatively new to using this statement... Thanks in advance...
ASKED: March 24, 2009  6:19 PM
UPDATED: March 25, 2009  1:46 PM

Answer Wiki

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

As I understand it *TAB gives you one complete and correct record
and uses all the fields in the first row of the input record
then error… I would suspect the Record Deliminator is RCDDLM is not *CRLF
Try CR if that doesn’t work try LF
here are some other record delimitors
*LFCR
*EOR
If it doesn’t match the actual record delimitor it trys to add more to the first record .. and gets error.
Phil

Discuss This Question: 1  Reply

 
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
  • djac
    Have you checked that you don't have any stray/additional tabs in the data in the input file? This could cause the data to be imported into invalid fields in the file (char into dec etc.) Anything in the joblog relating to this?
    900 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