View previous topic :: View next topic |
Author |
Message |
sudeeptripathi Beginner
Joined: 06 May 2011 Posts: 1 Topics: 1
|
Posted: Fri May 06, 2011 1:46 am Post subject: Reading a flat file through Rexx |
|
|
Hi ,
I am reading a flat file through rexx and using substr() to take input from file but while reading it changes the case of data while assigning to variable .
How to use parse or any other function to retain same case of data ? |
|
Back to top |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Fri May 06, 2011 8:13 am Post subject: |
|
|
This isn't enough info since we don't know your code, but are you using Parse Upper variable or Pull instead of Parse Pull? _________________ New members are encouraged to read the How To Ask Questions The Smart Way FAQ at http://www.catb.org/~esr/faqs/smart-questions.html. |
|
Back to top |
|
|
stefan Beginner
Joined: 20 Nov 2003 Posts: 41 Topics: 2 Location: Germany
|
Posted: Mon May 09, 2011 1:26 am Post subject: Re: Reading a flat file through Rexx |
|
|
I assume you have coded something like his:
Code: | "execio diskr ddname (finis)"
do queued()
pull data
say substr(data,1 15) /* Oops! Data got capitalized somehow! */
end |
In the REXX manual is written:
PULL reads a string from the head of the external data queue. It is just a short form of the instruction: PARSE UPPER PULL [template_list]
So you see it's the PULL instruction, not the SUBSTR, which causes the translation.
Replace PULL by "parse pull" as mentioned in the previous post. _________________ Stefan
There are 10 types of people in the world: Those who understand binary, and those who don't. |
|
Back to top |
|
|
radha_v Beginner
Joined: 20 Dec 2007 Posts: 2 Topics: 1
|
Posted: Tue Jun 14, 2011 2:59 pm Post subject: |
|
|
|
|
Back to top |
|
|
papadi Supermod
Joined: 20 Oct 2009 Posts: 594 Topics: 1
|
Posted: Tue Jun 14, 2011 3:05 pm Post subject: |
|
|
If you make and share a mistake, i suppose it is ok to hit yourself in the head. . .
For anything else, please don't.
di |
|
Back to top |
|
|
|
|