Philpl1jb
24570 pts. | Jan 13 2009 1:55PM GMT
Some time ago, I remember a similar problem.
What we did was to cut and paste the ‘|’ from a pc screen to the editor.
That symbol from the terminal emulator keyboard looked the same but had a different hex value.
Phil
Teandy
3250 pts. | Jan 13 2009 4:00PM GMT
The way I read your question, it looks like you are adding the pipe symbol to the flat file. I think this may be your problem.
Are you creating a flat file because you only need certain fields from the original file?
If not, let the CPYTOIMPF insert the pipe symbol for you.
CPYTOIMPF FROMFILE(MyFile) +
TOSTMF(’/IFSFOLDER/FILENAME.TXT’) +
MBROPT(*REPLACE) STMFCODPAG(*PCASCII) +
RCDDLM(*CRLF) STRDLM(*NONE) FLDDLM(’|')
If you do only need certain fields from the original file, create a work file using DDS that contains only the fields you want. Then use the CPYTOIMPF command as illustrated above.
Anderson123
840 pts. | Jan 13 2009 4:16PM GMT
The reason why i used cpytoimpf is that i want the naming convention to have more than 15 characters.Also i have already used the pipe to seperare the fields in flat file.Now when am doing cpytoimpf there are options like field and string delimiter where i have given a pipe symbol still it reaches the other system as !
I also sent the flat file with pipe delimiter directly thr ftp without using cpytoimpf and the same problem occured.
Philpl1jb
24570 pts. | Jan 13 2009 5:06PM GMT
Apparently you’re not the only one.
<a href="Ihttp://www.dynamoo.com/technical/ebcdic.htm" title="Ihttp://www.dynamoo.com/technical/ebcdic.htm" target="_blank">Ihttp://www.dynamoo.com/technical/ebcdic…</a>
My vertical bar is EBSIDIC 4F and when I FTP a file with it to my PC I get the vertical bar.
I think you want to transmit ascii 124 (decimal).
So you’ll want to check the ASCII conversion table you’re using.
In the data structure you may want to load it as X’4F’ or whatever value the conversion table uses.
Phil
Anderson123
840 pts. | Jan 13 2009 5:14PM GMT
I tried transmitting the flat file without using cpytoimpf and there still is a problem.
I dont have much idea about things like the ASCII conversion table.A small sample would gretaly help.
As of now i have initialised the part of DS with a ‘|’ symbol.A solution would be greatly appreciated.
Philpl1jb
24570 pts. | Jan 13 2009 7:14PM GMT
Well there seems to be trouble in them their translation tables.
I’m not sure which translation table you use
WrkTbl QASCII <– an obvious EBCDIC
The vertical bar in ASCII is 127 Hex 7c
The vertical bar in EBCDIC is 79 Hex 4f |
and 90 Hex 5a is !
and 106 Hex 6a is the broken vertical bar
My ASCII table shows EBCDIC 6a to 7c but my conversion for 4f works — I suspect my system isn’t using this table.
AND — HERE’S THE KICKER — 4f to 21 which happens to be … ! So QASCII will convert vert bar to !
So code your vertial var like this
D vert2 s 1 inz(X’6a’)
It will look like a vertical broken bar on your 400 screen but will convert to a real 7c vertical bar .. maybe.
Phil
Anderson123
840 pts. | Jan 16 2009 11:16AM GMT
I declared x’6A’ as suggested and it worked.That was a good one.Is 6A the hex value for spilt vertical bar?Am still confused as to why this happened?was it because of conversion from EBCDIC to ASCII.I think this is a rare case correct me if am wrong.
Philpl1jb
24570 pts. | Jan 16 2009 1:52PM GMT
Yes. 6a is the split vert bar.
Anyone using the QASCII table as their default would get that conversion unless they change the table.
And wayback when I was using the cut and past I must have been on a system using those tables.
Phil






