MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Reading a flat file through Rexx

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
sudeeptripathi
Beginner


Joined: 06 May 2011
Posts: 1
Topics: 1

PostPosted: Fri May 06, 2011 1:46 am    Post subject: Reading a flat file through Rexx Reply with quote

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
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Fri May 06, 2011 8:13 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
stefan
Beginner


Joined: 20 Nov 2003
Posts: 41
Topics: 2
Location: Germany

PostPosted: Mon May 09, 2011 1:26 am    Post subject: Re: Reading a flat file through Rexx Reply with quote

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
View user's profile Send private message
radha_v
Beginner


Joined: 20 Dec 2007
Posts: 2
Topics: 1

PostPosted: Tue Jun 14, 2011 2:59 pm    Post subject: Reply with quote

bonk
Back to top
View user's profile Send private message
papadi
Supermod


Joined: 20 Oct 2009
Posts: 594
Topics: 1

PostPosted: Tue Jun 14, 2011 3:05 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group