AS/400 tab text delimited format of physical file

130 pts.
Tags:
AS/400
AS/400 Database File
CLP
CPYTOIMPF
Database Files
DBF file
Hi , Using i series utility you can download PF as Text Tab Delimited format in your PC.However when I do the same by CLP using CPYTOIMPF using FLDDLM as X'05' or *tab , I get a text tab delimited file which is not completely same as the file downloaded using I series utility.

Software/Hardware used:
AS400 , Iseries
ASKED: June 5, 2011  6:06 AM
UPDATED: June 17, 2011  12:35 AM

Answer Wiki

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

Can you also state which ‘utility tool’ you are using for the download. We’ll all assume that you are refering to Client Acess transfers, but there are others.

Discuss This Question: 15  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
    ...a text tab delimited file which is not completely same as the file downloaded using I series utility. Why not? That is, what are the differences that you need help with? What problem are you trying to solve? What does your CPYTOIMPF command look like? What parameter values are you using for it? Tom
    125,585 pointsBadges:
    report
  • Atti123
    Hi Tom When I use CPYTOIMPF the parameters used are RCDDLM(X'0D25') , DTAFMT(*DLM) STRDLM(*NONE) and STRESCCHR(*NONE) RMVBLANK(*BOTH) FLDDLM(*TAB). However the text tab delimited file that is generated from here is different from the text tab delimited file I download manually using Iseries utility for downloading data from AS400 to PC. Thanks
    130 pointsBadges:
    report
  • TomLiotta
    However the text tab delimited file that is generated from here is different from the text tab delimited file I download manually... How is it different? Does it contain different data? Is one ASCII and the other is EBCDIC? Are the column widths different? Do the columns have different rules for quoting? Something else? RCDDLM(X’0D25′) , DTAFMT(*DLM) STRDLM(*NONE) and STRESCCHR(*NONE) RMVBLANK(*BOTH) FLDDLM(*TAB) I probably wouldn't ever use RCDDLM(X’0D25′), but use RCDDLM(*CRLF) instead. That could be particularly important depending on what you specified for the STMFCODPAG() parameter and depending on whether the output streamfile already existed or not. In any case, the actual differences that you see need to be described. It might also be necessary to know which one you feel is correct in order to know how to change the other one. Tom
    125,585 pointsBadges:
    report
  • Atti123
    Hi Tom , I am creating a tab text delimited format for file empdata . I am using the below command CPYTOIMPF FROMFILE(testlib/empdata) + TOSTMF('/fold1/empdata') + MBROPT(*REPLACE) RCDDLM(*CRLF) + DTAFMT(*DLM) STRDLM(*NONE) + STRESCCHR(*NONE) RMVBLANK(*BOTH) + FLDDLM(*TAB) But the result I get here is different from file I download manually using Iseries utility tool . Please suggest if something is wrong with my pgm. Thanks
    130 pointsBadges:
    report
  • TomLiotta
    But the result I get here is different from file I download manually... Yes, but HOW is it different? What is the difference that that you are seeing? What does the difference look like to you? How do you view the two files? Tom
    125,585 pointsBadges:
    report
  • Atti123
    Hi Tom , This is a sample of data coming from manual dwnlad 106512 24/05/2011 HC44C1*101910 The same file when obtained through clp is 106512 1/01/2011 AA-9999-1 The difference is may be coz blanks are nt being removed in the file obtained frm clp. hwever in the command cpytoimpf I have used RMVBLANK(*BOTH) What do u feel is missin!! Thanks
    130 pointsBadges:
    report
  • Atti123
    Pls ignre my previous post somehow the diff in the two files is nt appearing when I post the data The difference is that the file generated through clp is nt removing the blanks in a particular field , hwever since I am using RMVBLANKS in CPYTOIMPF this shud nt be happening. If there was some way I could upload the two text files it wud make thing much clear Thanks
    130 pointsBadges:
    report
  • Atti123
    Hi Yorkshireman I am using Client access transfer
    130 pointsBadges:
    report
  • TomLiotta
    This is a sample of data coming from manual dwnlad 106512 24/05/2011 HC44C1*101910 After you paste text, it gets displayed via HTML in a browser. If you want everything such as multiple embedded blanks, end-of-line delimiters, etc., to appear in browsers when the pasted text is viewed, you need to have all of the text attributes retained. In this editor, the easiest (or only) way to do that is by marking the pasted text as a {code} block. Paste the text. Then select what you pasted and click the {code} button at the top of the discussion box. That will insert the opening and closing tags that will help preserve the formatting. Note that this is a common problem for text that is presented through HTML in a browser. Tom
    125,585 pointsBadges:
    report
  • Atti123
    Hi Tom , The manual data is 106512 1/01/2011 AA-9999-1
    				
    130 pointsBadges:
    report
  • Yorkshireman
    So can I try and summarise what we knwo so far. You are running a version of IBM i aka as/400 - not sure which version (may not be relevant) You use the command CPYTOIMPF FROMFILE(testlib/empdata) TOSTMF(’/fold1/empdata’) MBROPT(*REPLACE) RCDDLM(*CRLF) DTAFMT(*DLM) STRDLM(*NONE) STRESCCHR(*NONE) RMVBLANK(*BOTH) FLDDLM(*TAB) which is stating that records have carriage return/line feed separators, fields are delimited, and denoted by separators of 'horizontal tab' characters, and both leading and trailiing blanks in fields should be removed (not embedded blanks though) We don't know if this is the correct format you require, or whether the format generated by a CA transfer is the correct one. A stored Client Access transfer retains its configuration in text files generated on the PC, located at wherever you did the 'save as' to. are you able to extract those, disguise any personal data, and post the results - as Tom explained - use the 'code' facility so it gets through the web presentation accurately.
    5,520 pointsBadges:
    report
  • Atti123
    Is there any way I can upload the text files
    130 pointsBadges:
    report
  • TomLiotta
    Is there any way I can upload the text files Well, especially considering that you're using *TAB delimiters, any interaction through a browser will be tricky. Personally, I would access both files through the IFS with the DSPF command. I'd then copy/paste enough of the text screens to show the differences in a couple lines that show the same rows, and I'd paste those two sections into {code} blocks here. The dspf command can show a clear text version of files like these, including hex if necessary. There'd be no confusion over spaces and tabs, and {code} formatting would preserve all details. Unless you want to take screen-shots and upload them to Flickr or other "photo site" and then include an {img} link here, I don't see a better way. Hmmm... maybe you can test whether an upload to http://pastebin.com would handle your files. Upload there and include links to them back here. I don't know how well a tab-delimited file is going to show up no matter where you upload it. Tom
    125,585 pointsBadges:
    report
  • Atti123
    Hi all, I will be updloading the text file bt let us all try the below code once and decide Create a file (file1) with charecter fileds of varying length keep atleast 5 - 6 fileds insert some data in the file and downlaod the file through client access in tab text delimited format. Now try the below CLP CRTPF FILE(QTEMP/FILE2)RCDLEN(1024) CPYTOIMPF FROMFILE(LIB1/FILE1) + TOFILE(QTEMP/FILE2) MBROPT(*REPLACE) + RCDDLM(*EOR) DTAFMT(*DLM) STRDLM(*NONE) + STRESCCHR(*NONE) RMVBLANK(*BOTH) FLDDLM(*TAB) CPYTOPCD FROMFILE(QTEMP/FILE2) TOFLR(FLR1) + TODOC(TEXT1) REPLACE(*YES) SNDDST TYPE(*DOC) TOINTNET(URMAILID) + DSTD('text tab') CFMDEL(*YES) + IMPORTANCE(*HIGH) PTY(*HIGH) + DOC(TEXTTAB) FLR(FLR1) DLTF FILE(QTEMP/FILE2) Now the two text files you get are same if not then what could be the reason. Please try the above. Thanks
    130 pointsBadges:
    report
  • TomLiotta
    Now the two text files you get are same if not then what could be the reason. From that CL, there are a number of possible reasons. First, you're using CRTPF to create a fixed-length physical file for CPYTOIMPF to put records into. Tab-delimited output from CPYTOIMPF probably should go into a streamfile, not a physical file. That is, a physical file is valid as a target for CPYTOIMPF; but the characteristics of a physical file are inherently different from those of a streamfile. Then you're processing the physical file through CPYTOPCD which is a nearly obsolete function. It creates a kind of streamfile, and it mostly should be okay; but it's hard to tell from here. Your system (or your profile or your job) might have configuration settings that make a significant difference. Then, you're using SNDDST to do SMTP e-mail. Hard to tell what results that might give for an attachment. I don't know of any specific issue with the sequence you're using, but it can't be relied upon for the majority of attachments that current e-mail systems use. Your attachment should be nothing but printable ASCII text in this case (plus tabs), so all should be well. Still, you'd be much better off doing SMTP e-mail according to standards. SNDDST is a SNA/DS command that has a basic 'bridge' feature to pass text messages back and forth with the SMTP server; it does no SMTP formatting of attachment content. In any case, I ran the test using an outfile from DSPFD TYPE(*ACCPTH) to give a variety of fields. My two files came out apparently the same. No visible differences. Tom
    125,585 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