Don't know if this will help you, but whenever I am using QSHELL "APIs" I
always create the outfile first with the CCSID I want before I stick content
in it.
For example, the following will create a file with a CCSID of 1252:
touch -C 1252 /home/aaron/myfile.txt
Note that is a capitol "C". A lowercase "c" means something else (I don't
immediately recall).
Or you could create it with the open() unix style API from RPG.
HTH,
Aaron Bartell
http://mowyourlawn.com
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Bob Schwartz
Sent: Thursday, January 10, 2008 7:24 AM
To: midrange-l@xxxxxxxxxxxx
Subject: qshell - grep removes CR from lines ?
I am running the qshell grep command on a csv file.
grep '\(^[0-9]\).*' ${INPUTFILE} > ${OUTPUTFILE}
The input csv file is ccsid 1252 with CRLF characters as end of each record.
The command selects all the correct records, but removes the CR.
Any seen this before, know why, how to correct?
Thanks, Bob S
As an Amazon Associate we earn from qualifying purchases.