Pipe Delimited CSV File

100 pts.
Tags:
CL Commands
CL programming
CSV
CSV file format
File conversion programs
File formats
File Transfer Protocols
I have the following Pipe Delimited data in a physical file:

Dealer Name¦Deal Number¦Buy/Sell¦ Joseph Camm¦80740¦S¦IG¦5000000.00¦

After issueing a CPYTOPCD command, I end up with:

Dealer NameÝDeal NumberÝBuy/SellÝIG1ÝAMOUNT_amountÝ David CammÝ80740ÝSÝIGÝ5000000.00Ý

How do I get around this?

 

 



Software/Hardware used:
iSeries, AS400
ASKED: December 22, 2009  11:32 AM
UPDATED: December 24, 2009  1:38 AM

Answer Wiki

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

As I remember it. there was a difference between the AS/400 | vertical bar and the ASCII pipe. We used to cut the pipe from an ASCII document and paste it into the 400 application (that was back when computers were made of stone). Don’t know if that would help.
Phil

————————————————————————————————————————-

You may be using the wrong character as your pipe. I believe the pipe character looks like this | and is a hex 4F. The ¦ character is a hex 6A.

E.T.

Discuss This Question: 9  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
  • Teandy
    What happens if you try something like this:
    CPYTOIMPF  FROMFILE(MYFILE) +                    
                 TOSTMF('/MYFOLDER/MYIFSFILE.TXT') +    
                 MBROPT(*REPLACE) STMFCODPAG(*PCASCII) + 
                RCDDLM(*CRLF) DTAFMT(*FIXED) STRDLM(*NONE)
    
    
    5,860 pointsBadges:
    report
  • TomLiotta
    First, why would you use CPYTOPCD? That involves an effectively obsolete file system (/QDLS). Second, how do you know what characters are used? Are you looking at them through a green-screen interface or through some PC program? When doing so, did you ensure that your system QCCSID value is correct? (Is your system incorrectly set with QCCSID 65535?) What job CCSID did you run the CPYTOPCD under? What are the language settings on your system? What are your terminal language settings? What are your PC language/region settings? If you transfer text bytes from any system to any other system, both systems must be properly configured to ensure bit-level text conversions to account for language/region. Tom
    125,585 pointsBadges:
    report
  • TomLiotta
    ...BTW, if you are viewing the characters through a PC emulator, you are transferring from your AS/400 to your PC. Tom
    125,585 pointsBadges:
    report
  • philpl1jb
    ElTerrifico is on to it. Hex 6A is the shift of the key on most AS/400 keyboards this is not the pipe key even though it looks like it. The translation table does not convert this to the pipe character. You need the hex F4 character, you can probably map a key for this in client access, cut an paste the correct value from a pc document, or change the translation table. What we did, way back was to get the pipe from the host and cut and paste it into the application. If you have the wrong character it doesn't matter a hoot if you use CPYTOPCD, CPYTOIPMS, or FTP or anyother tool it's coming out of the other end wrong! Phil
    48,575 pointsBadges:
    report
  • Ricca
    Thanks to all for your input. I was indeed using the wrong character. I am using CPYTOPCD because the file is then emailed (via SNDDST) and as far as I am aware, you cannot email an STMF file - can you? Is there a better way? Do you know the hex value of the [TAB] key?
    100 pointsBadges:
    report
  • philpl1jb
    Tab key delimited - discussion by tomLiotta http://itknowledgeexchange.techtarget.com/itanswers/tab-delimited-file/
    48,575 pointsBadges:
    report
  • philpl1jb
    Which might look better now. http://itknowledgeexchange.techtarget.com/itanswers/tab-delimited-file Phil
    48,575 pointsBadges:
    report
  • TomLiotta
    Minor tip I learned about this editor -- It won't let you paste a link cleanly into your discussion. When you paste one in, it automatically adds all of that surrounding junk. Best thing to do seems to be to select some text, e.g., "discussion by tomLiotta", and then click the 'link' button. In the pop-up box, paste the link address and press 'Ok'. The selected text is then turned into the text for the link you pasted into the link box. Works nice enough, though it obscures the link itself. It comes out looking like: discussion by tomLiotta Tom
    125,585 pointsBadges:
    report
  • philpl1jb
    Thanks Tom. Wilth a little effort the user could have sorted out the link as I posted it or found the answer through GOOGLE. Phil
    48,575 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