Re: [U2] Reading a Unix file from another machine. PROBLEM SOLVED
Finally got the file in the right format! Used Unix utility 'od' to convert from binary to ascii but in 7 bit Used Unix 'strings' command to convert line endings Used 'flip' command in ubuntu to convert to 8 bit file (needed to ftp file to ubuntu machine and back. Wow! Glad that's over. Thanks to all for your suggestions and help Roy -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Drew William Henderson Sent: Wednesday, November 10, 2010 10:16 AM To: U2 Users List Subject: Re: [U2] Reading a Unix file from another machine. It's been a L time since I worked with this kind of stuff, so if this is a silly idea, just say Nope...these aren't the droids you're looking for. :-) Could you treat the file as a tape, and make use of READT? Drew thinkingoutsidetheboxbeforelunchisabadidea Henderson ;-) -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of fft2...@aol.com Sent: Wednesday, November 10, 2010 9:01 AM To: u2-users@listserver.u2ug.org Subject: Re: [U2] Reading a Unix file from another machine. In a message dated 11/10/2010 4:55:04 AM Pacific Standard Time, ggal...@wyanokegroup.com writes: This sounds like a job for a quick perl routine. Read the file in byte by byte, and AND it with 127, then write it out byte by byte to a new file. George No George this will not work. Each byte you read will be 8 bits, so you'll be grabbing an extra bit from the next byte which is wrong you see. You have to read it in 7 bits at a time, and you cannot. That's why my 56bit read makes sense. Will 56bit Johnson ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Reading a Unix file from another machine.
If you read 56 bits you will be reading 8 bytes in 7-bit mode. But you will also be reading 7 bytes in 8-bit mode. So by reading 7 Ascii characters at a time out of your stream/file, you should be able to re-chunk them into 8 characters by prepending a bit 0 on the front of each 7-bit byte. How do you do that? Create a complete bit representation of your 7 character string (so 56 bits) and then cut it every 7 bits (to create 8 7-bit bytes), add a zero to the front of each cut, and calculate what ASCII character you have just created, then write that character back to a new file/stream. Old ways are the best ways. New fangled utilties fail us in our most critical hour. Will Old Fangled Johnson ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Reading a Unix file from another machine.
This sounds like a job for a quick perl routine. Read the file in byte by byte, and AND it with 127, then write it out byte by byte to a new file. George -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users- boun...@listserver.u2ug.org] On Behalf Of fft2...@aol.com Sent: Wednesday, November 10, 2010 8:37 AM To: u2-users@listserver.u2ug.org Subject: Re: [U2] Reading a Unix file from another machine. If you read 56 bits you will be reading 8 bytes in 7-bit mode. But you will also be reading 7 bytes in 8-bit mode. So by reading 7 Ascii characters at a time out of your stream/file, you should be able to re-chunk them into 8 characters by prepending a bit 0 on the front of each 7-bit byte. How do you do that? Create a complete bit representation of your 7 character string (so 56 bits) and then cut it every 7 bits (to create 8 7-bit bytes), add a zero to the front of each cut, and calculate what ASCII character you have just created, then write that character back to a new file/stream. Old ways are the best ways. New fangled utilties fail us in our most critical hour. Will Old Fangled Johnson ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Reading a Unix file from another machine.
In a message dated 11/10/2010 4:55:04 AM Pacific Standard Time, ggal...@wyanokegroup.com writes: This sounds like a job for a quick perl routine. Read the file in byte by byte, and AND it with 127, then write it out byte by byte to a new file. George No George this will not work. Each byte you read will be 8 bits, so you'll be grabbing an extra bit from the next byte which is wrong you see. You have to read it in 7 bits at a time, and you cannot. That's why my 56bit read makes sense. Will 56bit Johnson ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Reading a Unix file from another machine.
I understand the 7 bit method your talking about. But if you can see the values in Vt100 term type, it's only stripping off the 8th bit? vs pushing the 8th bit to the front of the next byte? -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users- boun...@listserver.u2ug.org] On Behalf Of fft2...@aol.com Sent: Wednesday, November 10, 2010 9:01 AM To: u2-users@listserver.u2ug.org Subject: Re: [U2] Reading a Unix file from another machine. In a message dated 11/10/2010 4:55:04 AM Pacific Standard Time, ggal...@wyanokegroup.com writes: This sounds like a job for a quick perl routine. Read the file in byte by byte, and AND it with 127, then write it out byte by byte to a new file. George No George this will not work. Each byte you read will be 8 bits, so you'll be grabbing an extra bit from the next byte which is wrong you see. You have to read it in 7 bits at a time, and you cannot. That's why my 56bit read makes sense. Will 56bit Johnson ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Reading a Unix file from another machine.
In a message dated 11/10/2010 5:03:26 AM Pacific Standard Time, ggal...@wyanokegroup.com writes: I understand the 7 bit method your talking about. But if you can see the values in Vt100 term type, it's only stripping off the 8th bit? vs pushing the 8th bit to the front of the next byte? It's making a manipulation that you cannot easily replicate in Universe BASIC. Your viewing terminal does not represent what your remote BASIC program, running in its own little world, it going to do. Your basic routine doesn't mimic what you see on your viewer :) That's why you have to fiddle with it. Will Fiddler Johnson ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Reading a Unix file from another machine.
In a message dated 11/10/2010 5:03:26 AM Pacific Standard Time, ggal...@wyanokegroup.com writes: I understand the 7 bit method your talking about. But if you can see the values in Vt100 term type, it's only stripping off the 8th bit? vs pushing the 8th bit to the front of the next byte? Oh by the way, its not stripping off the 8th bit. It's *assuming* that there are only 7 bits of valid information per byte. It's *chunking* the information into 7bits at a time. So in 8 characters there are only 56 bits you see, not 64 as we'd expect. That's the viewing problem alltogether. The data is being squeezed into a smaller space. Will Problem Johnson ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Reading a Unix file from another machine.
It's been a L time since I worked with this kind of stuff, so if this is a silly idea, just say Nope...these aren't the droids you're looking for. :-) Could you treat the file as a tape, and make use of READT? Drew thinkingoutsidetheboxbeforelunchisabadidea Henderson ;-) -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of fft2...@aol.com Sent: Wednesday, November 10, 2010 9:01 AM To: u2-users@listserver.u2ug.org Subject: Re: [U2] Reading a Unix file from another machine. In a message dated 11/10/2010 4:55:04 AM Pacific Standard Time, ggal...@wyanokegroup.com writes: This sounds like a job for a quick perl routine. Read the file in byte by byte, and AND it with 127, then write it out byte by byte to a new file. George No George this will not work. Each byte you read will be 8 bits, so you'll be grabbing an extra bit from the next byte which is wrong you see. You have to read it in 7 bits at a time, and you cannot. That's why my 56bit read makes sense. Will 56bit Johnson ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
[U2] Reading a Unix file from another machine.
Hi all, I am trying to read a Unix file from and old aix machine. The people who sent it will not bend in how they sent it. What I got was in binary format so I used 'od' to convert it to ascii. When I tried to cat the file before trying to READSEQ records it looked like gibberish! I realized that if I set my Term type to vt100, I could read it but the carriage returns were just ^M after each record. After trying 'sed' I gave up. Universe will not read the file at all. I still get gibberish even on the converted file. Any ideas? There must be a way to do this. What am I missing? Thanks, Roy ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Reading a Unix file from another machine.
Try using at the unix command line String filename newfilenamer This will strip out all control characters - Original Message - From: Roy Beard [mailto:r...@cfl.rr.com] Sent: Tuesday, November 09, 2010 05:05 PM To: 'U2 Users List' u2-users@listserver.u2ug.org Subject: [U2] Reading a Unix file from another machine. Hi all, I am trying to read a Unix file from and old aix machine. The people who sent it will not bend in how they sent it. What I got was in binary format so I used 'od' to convert it to ascii. When I tried to cat the file before trying to READSEQ records it looked like gibberish! I realized that if I set my Term type to vt100, I could read it but the carriage returns were just ^M after each record. After trying 'sed' I gave up. Universe will not read the file at all. I still get gibberish even on the converted file. Any ideas? There must be a way to do this. What am I missing? Thanks, Roy ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Reading a Unix file from another machine.
was the original file in EBCDIC? otherwise why convert it to ascii? Is it a directory structure written out as a binary file? Will cpio read the file? -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users- boun...@listserver.u2ug.org] On Behalf Of Roy Beard Sent: Tuesday, November 09, 2010 5:05 PM To: 'U2 Users List' Subject: [U2] Reading a Unix file from another machine. Hi all, I am trying to read a Unix file from and old aix machine. The people who sent it will not bend in how they sent it. What I got was in binary format so I used 'od' to convert it to ascii. When I tried to cat the file before trying to READSEQ records it looked like gibberish! I realized that if I set my Term type to vt100, I could read it but the carriage returns were just ^M after each record. After trying 'sed' I gave up. Universe will not read the file at all. I still get gibberish even on the converted file. Any ideas? There must be a way to do this. What am I missing? Thanks, Roy ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Reading a Unix file from another machine.
It apparently is a 7 bit file, hence when I use vt100 (7 bit) I can read it, But not vt220 (8 bit). It is not a directory but a pipe delimited file. -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of George Gallen Sent: Tuesday, November 09, 2010 5:10 PM To: U2 Users List Subject: Re: [U2] Reading a Unix file from another machine. was the original file in EBCDIC? otherwise why convert it to ascii? Is it a directory structure written out as a binary file? Will cpio read the file? -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users- boun...@listserver.u2ug.org] On Behalf Of Roy Beard Sent: Tuesday, November 09, 2010 5:05 PM To: 'U2 Users List' Subject: [U2] Reading a Unix file from another machine. Hi all, I am trying to read a Unix file from and old aix machine. The people who sent it will not bend in how they sent it. What I got was in binary format so I used 'od' to convert it to ascii. When I tried to cat the file before trying to READSEQ records it looked like gibberish! I realized that if I set my Term type to vt100, I could read it but the carriage returns were just ^M after each record. After trying 'sed' I gave up. Universe will not read the file at all. I still get gibberish even on the converted file. Any ideas? There must be a way to do this. What am I missing? Thanks, Roy ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Reading a Unix file from another machine.
NO joy! # cd /dbms # ls -l master -rwxrwxrwx 1 root system 54683259 Nov 08 18:16 master # string master newmaster ksh: string: not found. # -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Dan Goble Sent: Tuesday, November 09, 2010 5:09 PM To: 'u2-users@listserver.u2ug.org' Subject: Re: [U2] Reading a Unix file from another machine. Try using at the unix command line String filename newfilenamer This will strip out all control characters - Original Message - From: Roy Beard [mailto:r...@cfl.rr.com] Sent: Tuesday, November 09, 2010 05:05 PM To: 'U2 Users List' u2-users@listserver.u2ug.org Subject: [U2] Reading a Unix file from another machine. Hi all, I am trying to read a Unix file from and old aix machine. The people who sent it will not bend in how they sent it. What I got was in binary format so I used 'od' to convert it to ascii. When I tried to cat the file before trying to READSEQ records it looked like gibberish! I realized that if I set my Term type to vt100, I could read it but the carriage returns were just ^M after each record. After trying 'sed' I gave up. Universe will not read the file at all. I still get gibberish even on the converted file. Any ideas? There must be a way to do this. What am I missing? Thanks, Roy ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Reading a Unix file from another machine.
That helped but only in 7 bit mode! -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Dan Goble Sent: Tuesday, November 09, 2010 5:25 PM To: 'u2-users@listserver.u2ug.org' Subject: Re: [U2] Reading a Unix file from another machine. Sorry ... The command is strings Not string. Typing from a blackberry - Original Message - From: Roy Beard [mailto:r...@cfl.rr.com] Sent: Tuesday, November 09, 2010 05:23 PM To: 'U2 Users List' u2-users@listserver.u2ug.org Subject: Re: [U2] Reading a Unix file from another machine. NO joy! # cd /dbms # ls -l master -rwxrwxrwx 1 root system 54683259 Nov 08 18:16 master # string master newmaster ksh: string: not found. # -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Dan Goble Sent: Tuesday, November 09, 2010 5:09 PM To: 'u2-users@listserver.u2ug.org' Subject: Re: [U2] Reading a Unix file from another machine. Try using at the unix command line String filename newfilenamer This will strip out all control characters - Original Message - From: Roy Beard [mailto:r...@cfl.rr.com] Sent: Tuesday, November 09, 2010 05:05 PM To: 'U2 Users List' u2-users@listserver.u2ug.org Subject: [U2] Reading a Unix file from another machine. Hi all, I am trying to read a Unix file from and old aix machine. The people who sent it will not bend in how they sent it. What I got was in binary format so I used 'od' to convert it to ascii. When I tried to cat the file before trying to READSEQ records it looked like gibberish! I realized that if I set my Term type to vt100, I could read it but the carriage returns were just ^M after each record. After trying 'sed' I gave up. Universe will not read the file at all. I still get gibberish even on the converted file. Any ideas? There must be a way to do this. What am I missing? Thanks, Roy ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Reading a Unix file from another machine.
# cat master | more °³üªü·¶ üªüªü ü ü ü ü ü ü ü ü M-^M° üªü·¶ üªüªü ü ü ü ü ü ü ü ü M-^M°µüªü·¶ üªü ü ü ü ü ü ü ü M-^M°¶üªü·¶ üªüªü ü ü ü ü ü ü ü ü M-^M°·üªü·¶ üªüªü ü ü ü ü ü ü üM ° üªü·¶ üªüªü ü ü ü ü ü ü ü ü M-^M°¹üªü·¶ üªüªü ü ü ü ü ü ü ü ü M-^M°³üªüÌDz°²Íü °°± ³°üü ü ü ü ü ü ü M-^M° üªüÌDz°²Íüªüªü°°± ³°ü ü ü ü ü ü ü M-^M°µüªüÌDz°²Íüªüªü°°± ³°üü ü ü ü ü ü ü M-^M°¶üªüÌÍ üªüªü°°± ³°üü ü ü ü ü ü ü M-^M°·üªüÌDz°²Íüªüªü°°± ³°ü ü ü ü ü ü ü ü M-^M° üªüÌDz°²Íüªüªü°°± ³°üü ü ü ü ü ü ü M-^M°Ì Dz°²Íüªüªü°°± ³°üü ü ü ü ü ü ü M-^M° üªüÔdz³³ ÚÕÒÎüªüªü°°± ¹ ü ü ü ü ü ü ü M-^M°¹üªüÔdz³³ ÚÕÒÎüªüªü°°± ¹ ü ü ü ü ü ü ü ü M-^M°³üªüÔdz³³ ÚÕÒÎüªü± ¹ ü ü ü ü ü ü ü ü M-^M° üªüÔdz³³ ÚÕÒÎüªüªü°°± ¹ ü ü ü ü ü ü ü ü M-^M°µüªüÔdz³³Î üªüªü°°± ¹ ü ü ü ü ü ü ü ü M-^M°¶üªüÔdz³³ ÚÕÒÎüªüªü°°± ¹ ü ü ü ü ü ü ü ü M-^M°·Ç ³³³ ÚÕÒÎüªüªü°°± ¹ ü ü ü ü ü ü ü ü M-^M°±ü±ü ËÏÈÌÅÒ± ÒÅÍÉÅÒüÎÏÎ ÉÎÖÅÎÔÏÒÙ ÉÔÅÍü ü ü ü ü ü ü ü ü M-^M°²ü±ü ËÏÈÌÅÒ± ÒÅÍÉÅÒüÎÏÎ ÉÎÖÅÎÔÏÒÙ ÉÔÅÍü ü ü ü ü ü ü ü ü M-^M°±ü±ü ËÏÈÌÅÒ± ÒÅÍÉÅÒü ÒÅÍÉÅÒ ÆÁÕÃÅÔÓüËÏÈÌÅÒ ÃÁÔ ÈÅÁÄÅÒü°°±³µ°ü ü ü ü ü ü ü M-^M°²ü±ü ËÏÈÌÅÒ± ÒÅÍÉÅÒü ÒÅÍÉÅÒ ÆÁÕÃÅÔÓüËÏÈÌÅÒ ÃÁÔ ÈÅÁÄÅÒü°°±³µ°ü ü ü ü ü ü As vt100 # cat master | more 03|*|764|*|*| | | | | | | | | M-^M08|*|764|*|*| | | | | | | | | M-^M05|*|764|*| | | | | | | | M-^M06|*|764|*|*| | | | | | | | | M-^M07|*|764|*|*| | | | | | | |M 04|*|764|*|*| | | | | | | | | M-^M09|*|764|*|*| | | | | | | | | M-^M03|*|LG202M| 001430|| | | | | | | M-^M08|*|LG202M|*|*|001430| | | | | | | M-^M05|*|LG202M|*|*|001430|| | | | | | | M-^M06|*|LM |*|*|001430|| | | | | | | M-^M07|*|LG202M|*|*|001430| | | | | | | | M-^M04|*|LG202M|*|*|001430|| | | | | | | M-^M0L G202M|*|*|001430|| | | | | | | M-^M04|*|TG333-ZURN|*|*|001894| | | | | | | M-^M09|*|TG333-ZURN|*|*|001894| | | | | | | | M-^M03|*|TG333-ZURN|*|1 894| | | | | | | | M-^M08|*|TG333-ZURN|*|*|001894| | | | | | | | M-^M05|*|TG333N |*|*|001894| | | | | | | | M-^M06|*|TG333-ZURN|*|*|001894| | | | | | | | M-^M07G 333-ZURN|*|*|001894| | | | | | | | M-^M01|1| KOHLER1 PREMIER|NON INVENTORY -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Dan Goble Sent: Tuesday, November 09, 2010 5:09 PM To: 'u2-users@listserver.u2ug.org' Subject: Re: [U2] Reading a Unix file from another machine. Try using at the unix command line String filename newfilenamer This will strip out all control characters - Original Message - From: Roy Beard [mailto:r...@cfl.rr.com] Sent: Tuesday, November 09, 2010 05:05 PM To: 'U2 Users List' u2-users@listserver.u2ug.org Subject: [U2] Reading a Unix file from another machine. Hi all, I am trying to read a Unix file from and old aix machine. The people who sent it will not bend in how they sent it. What I got was in binary format so I used 'od' to convert it to ascii. When I tried to cat the file before trying to READSEQ records it looked like gibberish! I realized that if I set my Term type to vt100, I could read it but the carriage returns were just ^M after each record. After trying 'sed' I gave up. Universe will not read the file at all. I still get gibberish even on the converted file. Any ideas? There must be a way to do this. What am I missing? Thanks, Roy ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Reading a Unix file from another machine.
Sorry ... The command is strings Not string. Typing from a blackberry - Original Message - From: Roy Beard [mailto:r...@cfl.rr.com] Sent: Tuesday, November 09, 2010 05:23 PM To: 'U2 Users List' u2-users@listserver.u2ug.org Subject: Re: [U2] Reading a Unix file from another machine. NO joy! # cd /dbms # ls -l master -rwxrwxrwx 1 root system 54683259 Nov 08 18:16 master # string master newmaster ksh: string: not found. # -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Dan Goble Sent: Tuesday, November 09, 2010 5:09 PM To: 'u2-users@listserver.u2ug.org' Subject: Re: [U2] Reading a Unix file from another machine. Try using at the unix command line String filename newfilenamer This will strip out all control characters - Original Message - From: Roy Beard [mailto:r...@cfl.rr.com] Sent: Tuesday, November 09, 2010 05:05 PM To: 'U2 Users List' u2-users@listserver.u2ug.org Subject: [U2] Reading a Unix file from another machine. Hi all, I am trying to read a Unix file from and old aix machine. The people who sent it will not bend in how they sent it. What I got was in binary format so I used 'od' to convert it to ascii. When I tried to cat the file before trying to READSEQ records it looked like gibberish! I realized that if I set my Term type to vt100, I could read it but the carriage returns were just ^M after each record. After trying 'sed' I gave up. Universe will not read the file at all. I still get gibberish even on the converted file. Any ideas? There must be a way to do this. What am I missing? Thanks, Roy ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Reading a Unix file from another machine.
I suggest using dos2unix to convert it to Unix format. Clive On Tue, Nov 9, 2010 at 10:23 PM, Roy Beard r...@cfl.rr.com wrote: NO joy! # cd /dbms # ls -l master -rwxrwxrwx 1 root system 54683259 Nov 08 18:16 master # string master newmaster ksh: string: not found. # -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Dan Goble Sent: Tuesday, November 09, 2010 5:09 PM To: 'u2-users@listserver.u2ug.org' Subject: Re: [U2] Reading a Unix file from another machine. Try using at the unix command line String filename newfilenamer This will strip out all control characters - Original Message - From: Roy Beard [mailto:r...@cfl.rr.com] Sent: Tuesday, November 09, 2010 05:05 PM To: 'U2 Users List' u2-users@listserver.u2ug.org Subject: [U2] Reading a Unix file from another machine. Hi all, I am trying to read a Unix file from and old aix machine. The people who sent it will not bend in how they sent it. What I got was in binary format so I used 'od' to convert it to ascii. When I tried to cat the file before trying to READSEQ records it looked like gibberish! I realized that if I set my Term type to vt100, I could read it but the carriage returns were just ^M after each record. After trying 'sed' I gave up. Universe will not read the file at all. I still get gibberish even on the converted file. Any ideas? There must be a way to do this. What am I missing? Thanks, Roy ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users -- Clive -- 077222971491 ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Reading a Unix file from another machine.
Is AIX ebcdic? I use dd to convert files from ebcdic to ascii. Are they sending you packed data? I used to have to read the records using OSBREAD and then do an OCONV to unpack them. -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Roy Beard Sent: Tuesday, November 09, 2010 4:05 PM To: 'U2 Users List' Subject: [U2] Reading a Unix file from another machine. Hi all, I am trying to read a Unix file from and old aix machine. The people who sent it will not bend in how they sent it. What I got was in binary format so I used 'od' to convert it to ascii. When I tried to cat the file before trying to READSEQ records it looked like gibberish! I realized that if I set my Term type to vt100, I could read it but the carriage returns were just ^M after each record. After trying 'sed' I gave up. Universe will not read the file at all. I still get gibberish even on the converted file. Any ideas? There must be a way to do this. What am I missing? Thanks, Roy ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Reading a Unix file from another machine.
No the file seems to be ascii but 7 bit. After using the strings command, I can readseq and writeseq records from it to another file, but only when using a vt100 emulator. When I try too read the new file with vt220 it is gibberish. ? Roy -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Baakkonen, Rodney A (Rod) 46K Sent: Tuesday, November 09, 2010 5:38 PM To: U2 Users List Subject: Re: [U2] Reading a Unix file from another machine. Is AIX ebcdic? I use dd to convert files from ebcdic to ascii. Are they sending you packed data? I used to have to read the records using OSBREAD and then do an OCONV to unpack them. -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Roy Beard Sent: Tuesday, November 09, 2010 4:05 PM To: 'U2 Users List' Subject: [U2] Reading a Unix file from another machine. Hi all, I am trying to read a Unix file from and old aix machine. The people who sent it will not bend in how they sent it. What I got was in binary format so I used 'od' to convert it to ascii. When I tried to cat the file before trying to READSEQ records it looked like gibberish! I realized that if I set my Term type to vt100, I could read it but the carriage returns were just ^M after each record. After trying 'sed' I gave up. Universe will not read the file at all. I still get gibberish even on the converted file. Any ideas? There must be a way to do this. What am I missing? Thanks, Roy ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Reading a Unix file from another machine.
Try /usr/bin/strings -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Roy Beard Sent: Tuesday, November 09, 2010 4:23 PM To: 'U2 Users List' Subject: Re: [U2] Reading a Unix file from another machine. NO joy! # cd /dbms # ls -l master -rwxrwxrwx 1 root system 54683259 Nov 08 18:16 master # string master newmaster ksh: string: not found. # -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Dan Goble Sent: Tuesday, November 09, 2010 5:09 PM To: 'u2-users@listserver.u2ug.org' Subject: Re: [U2] Reading a Unix file from another machine. Try using at the unix command line String filename newfilenamer This will strip out all control characters - Original Message - From: Roy Beard [mailto:r...@cfl.rr.com] Sent: Tuesday, November 09, 2010 05:05 PM To: 'U2 Users List' u2-users@listserver.u2ug.org Subject: [U2] Reading a Unix file from another machine. Hi all, I am trying to read a Unix file from and old aix machine. The people who sent it will not bend in how they sent it. What I got was in binary format so I used 'od' to convert it to ascii. When I tried to cat the file before trying to READSEQ records it looked like gibberish! I realized that if I set my Term type to vt100, I could read it but the carriage returns were just ^M after each record. After trying 'sed' I gave up. Universe will not read the file at all. I still get gibberish even on the converted file. Any ideas? There must be a way to do this. What am I missing? Thanks, Roy ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Reading a Unix file from another machine.
You could try converting the ^M (carriage return) into a linefeed using the command: cat master | tr \r \n | new.master And cating the file might not be a true indication of your ability to open and read the file within UV/UD. The vt100 view indicates that the content is legible. The vt220 emulation is corrupting the *view* of the content and is not a true reflection of the contents. Converting the carriage return to a linefeed will make the file more usable in unix. Gregor -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Roy Beard Sent: Wednesday, 10 November 2010 9:27 AM To: 'U2 Users List' Subject: Re: [U2] Reading a Unix file from another machine. # cat master | more °³üªü·¶ üªüªü ü ü ü ü ü ü ü ü M-^M° üªü·¶ üªüªü ü ü ü ü ü ü ü ü M-^M°µüªü·¶ üªü ü ü ü ü ü ü ü M-^M°¶üªü·¶ üªüªü ü ü ü ü ü ü ü ü M-^M°·üªü·¶ üªüªü ü ü ü ü ü ü üM ° üªü·¶ üªüªü ü ü ü ü ü ü ü ü M-^M°¹üªü·¶ üªüªü ü ü ü ü ü ü ü ü M-^M°³üªüÌDz°²Íü °°± ³°üü ü ü ü ü ü ü M-^M° üªüÌDz°²Íüªüªü°°± ³°ü ü ü ü ü ü ü M-^M°µüªüÌDz°²Íüªüªü°°± ³°üü ü ü ü ü ü ü M-^M°¶üªüÌÍ üªüªü°°± ³°üü ü ü ü ü ü ü M-^M°·üªüÌDz°²Íüªüªü°°± ³°ü ü ü ü ü ü ü ü M-^M° üªüÌDz°²Íüªüªü°°± ³°üü ü ü ü ü ü ü M-^M°Ì Dz°²Íüªüªü°°± ³°üü ü ü ü ü ü ü M-^M° üªüÔdz³³ ÚÕÒÎüªüªü°°± ¹ ü ü ü ü ü ü ü M-^M°¹üªüÔdz³³ ÚÕÒÎüªüªü°°± ¹ ü ü ü ü ü ü ü ü M-^M°³üªüÔdz³³ ÚÕÒÎüªü± ¹ ü ü ü ü ü ü ü ü M-^M° üªüÔdz³³ ÚÕÒÎüªüªü°°± ¹ ü ü ü ü ü ü ü ü M-^M°µüªüÔdz³³Î üªüªü°°± ¹ ü ü ü ü ü ü ü ü M-^M°¶üªüÔdz³³ ÚÕÒÎüªüªü°°± ¹ ü ü ü ü ü ü ü ü M-^M°·Ç ³³³ ÚÕÒÎüªüªü°°± ¹ ü ü ü ü ü ü ü ü M-^M°±ü±ü ËÏÈÌÅÒ± ÒÅÍÉÅÒüÎÏÎ ÉÎÖÅÎÔÏÒÙ ÉÔÅÍü ü ü ü ü ü ü ü ü M-^M°²ü±ü ËÏÈÌÅÒ± ÒÅÍÉÅÒüÎÏÎ ÉÎÖÅÎÔÏÒÙ ÉÔÅÍü ü ü ü ü ü ü ü ü M-^M°±ü±ü ËÏÈÌÅÒ± ÒÅÍÉÅÒü ÒÅÍÉÅÒ ÆÁÕÃÅÔÓüËÏÈÌÅÒ ÃÁÔ ÈÅÁÄÅÒü°°±³µ°ü ü ü ü ü ü ü M-^M°²ü±ü ËÏÈÌÅÒ± ÒÅÍÉÅÒü ÒÅÍÉÅÒ ÆÁÕÃÅÔÓüËÏÈÌÅÒ ÃÁÔ ÈÅÁÄÅÒü°°±³µ°ü ü ü ü ü ü As vt100 # cat master | more 03|*|764|*|*| | | | | | | | | M-^M08|*|764|*|*| | | | | | | | | M-^M05|*|764|*| | | | | | | | M-^M06|*|764|*|*| | | | | | | | | M-^M07|*|764|*|*| | | | | | | |M 04|*|764|*|*| | | | | | | | | M-^M09|*|764|*|*| | | | | | | | | M-^M03|*|LG202M| 001430|| | | | | | | M-^M08|*|LG202M|*|*|001430| | | | | | | M-^M05|*|LG202M|*|*|001430|| | | | | | | M-^M06|*|LM |*|*|001430|| | | | | | | M-^M07|*|LG202M|*|*|001430| | | | | | | | M-^M04|*|LG202M|*|*|001430|| | | | | | | M-^M0L G202M|*|*|001430|| | | | | | | M-^M04|*|TG333-ZURN|*|*|001894| | | | | | | M-^M09|*|TG333-ZURN|*|*|001894| | | | | | | | M-^M03|*|TG333-ZURN|*|1 894| | | | | | | | M-^M08|*|TG333-ZURN|*|*|001894| | | | | | | | M-^M05|*|TG333N |*|*|001894| | | | | | | | M-^M06|*|TG333-ZURN|*|*|001894| | | | | | | | M-^M07G 333-ZURN|*|*|001894| | | | | | | | M-^M01|1| KOHLER1 PREMIER|NON INVENTORY -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Dan Goble Sent: Tuesday, November 09, 2010 5:09 PM To: 'u2-users@listserver.u2ug.org' Subject: Re: [U2] Reading a Unix file from another machine. Try using at the unix command line String filename newfilenamer This will strip out all control characters - Original Message - From: Roy Beard [mailto:r...@cfl.rr.com] Sent: Tuesday, November 09, 2010 05:05 PM To: 'U2 Users List' u2-users@listserver.u2ug.org Subject: [U2] Reading a Unix file from another machine. Hi all, I am trying to read a Unix file from and old aix machine. The people who sent it will not bend in how they sent it. What I got was in binary format so I used 'od' to convert it to ascii. When I tried to cat the file before trying to READSEQ records it looked like gibberish! I realized that if I set my Term type to vt100, I could read it but the carriage returns were just ^M after each record. After trying 'sed' I gave up. Universe will not read the file at all. I still get gibberish even on the converted file. Any ideas? There must be a way to do this. What am I missing? Thanks, Roy ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users -- Message protected by DealerGuard: e-mail anti-virus, anti-spam and content filtering. http://www.pentanasolutions.com Click here to report this message as spam: https://login.mailguard.com.au/report/1B4vNP9s6S/4ebGoJHMofhf2Tjg3O0ZOv/0.6 This email and any attachments to it are confidential. You must not use
Re: [U2] Reading a Unix file from another machine.
On 09/11/10 22:21, Roy Beard wrote: It apparently is a 7 bit file, hence when I use vt100 (7 bit) I can read it, But not vt220 (8 bit). It is not a directory but a pipe delimited file. It looks to me a bit like a Prime file! Can you look at the file with a hex viewer? If you've got access to Midnight Commander I think that had a hex-view mode. If each byte starts with 8 or higher then the file is 7 bit with parity on and no wonder it looks weird! You'll need to get it converted to parity off - dead easy to say but I don't know how to string the unix utilities together to make it work for you. But you'd just need to AND each byte with 0x7f. Cheers, Wol -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of George Gallen Sent: Tuesday, November 09, 2010 5:10 PM To: U2 Users List Subject: Re: [U2] Reading a Unix file from another machine. was the original file in EBCDIC? otherwise why convert it to ascii? Is it a directory structure written out as a binary file? Will cpio read the file? -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users- boun...@listserver.u2ug.org] On Behalf Of Roy Beard Sent: Tuesday, November 09, 2010 5:05 PM To: 'U2 Users List' Subject: [U2] Reading a Unix file from another machine. Hi all, I am trying to read a Unix file from and old aix machine. The people who sent it will not bend in how they sent it. What I got was in binary format so I used 'od' to convert it to ascii. When I tried to cat the file before trying to READSEQ records it looked like gibberish! I realized that if I set my Term type to vt100, I could read it but the carriage returns were just ^M after each record. After trying 'sed' I gave up. Universe will not read the file at all. I still get gibberish even on the converted file. Any ideas? There must be a way to do this. What am I missing? Thanks, Roy ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Reading a Unix file from another machine.
Hi Roy, What you need to do is to add a line feed LF char(10) to your carriage returns char(13). This can either be done at unix level by cat file | tr '\l' '\l\015' file2 (15 being the octal equivalent of 13) or programatically by CHANGE(RECORD,CHAR(13),CHAR(10):CHAR(13),-1) I don't have an AIX machine in front of me at the moment so I may not be 100% correct on the syntax but that shout give you something to play around with. On Wed, Nov 10, 2010 at 9:05 AM, Roy Beard r...@cfl.rr.com wrote: Hi all, I am trying to read a Unix file from and old aix machine. The people who sent it will not bend in how they sent it. What I got was in binary format so I used 'od' to convert it to ascii. When I tried to cat the file before trying to READSEQ records it looked like gibberish! I realized that if I set my Term type to vt100, I could read it but the carriage returns were just ^M after each record. After trying 'sed' I gave up. Universe will not read the file at all. I still get gibberish even on the converted file. Any ideas? There must be a way to do this. What am I missing? Thanks, Roy ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Reading a Unix file from another machine.
If the binary file it truly 7 bit, try dos2unix -c 7bit master newfile, then see if you can cat newfile. rex On Tue, Nov 9, 2010 at 7:28 PM, Adrian Overs u2u...@gmail.com wrote: Hi Roy, What you need to do is to add a line feed LF char(10) to your carriage returns char(13). This can either be done at unix level by cat file | tr '\l' '\l\015' file2 (15 being the octal equivalent of 13) or programatically by CHANGE(RECORD,CHAR(13),CHAR(10):CHAR(13),-1) I don't have an AIX machine in front of me at the moment so I may not be 100% correct on the syntax but that shout give you something to play around with. On Wed, Nov 10, 2010 at 9:05 AM, Roy Beard r...@cfl.rr.com wrote: Hi all, I am trying to read a Unix file from and old aix machine. The people who sent it will not bend in how they sent it. What I got was in binary format so I used 'od' to convert it to ascii. When I tried to cat the file before trying to READSEQ records it looked like gibberish! I realized that if I set my Term type to vt100, I could read it but the carriage returns were just ^M after each record. After trying 'sed' I gave up. Universe will not read the file at all. I still get gibberish even on the converted file. Any ideas? There must be a way to do this. What am I missing? Thanks, Roy ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users