Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

parsing the variables with the ~ separator

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
vidyaa

New User


Joined: 02 May 2008
Posts: 70
Location: chennai

PostPosted: Wed Jun 11, 2008 11:06 am    Post subject: parsing the variables with the ~ separator
Reply with quote

Hi,

can anyone tell me how to parse the variables having the ~ seperator and assign it to different varibles....the difficulty here is we will not know how many varibles are there in the record

ex:
input file is
AAA~DVDF~12324~
432434~FSD~

The number of varibles is not constant per line so we carnt use general parsing over the records....then what is the method of parsing these values and putting in as many number of varibles.

my outpput should be like
VAR1 = AAA
VAR2 = DVDF
VAR3 = 1234
VAR4 = 432434
VAR5 = FSD

Please help on the same
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Wed Jun 11, 2008 11:14 am    Post subject: Reply to: parsing the variables with the ~ separator
Reply with quote

I do not see any DB2 relation...

What language do You want to use for parsing ?
Back to top
View user's profile Send private message
Sinkaravelan S

New User


Joined: 21 Apr 2008
Posts: 27
Location: coimbatore-TN india

PostPosted: Wed Jun 11, 2008 12:51 pm    Post subject: Reply to: parsing the variables with the ~ separator
Reply with quote

Hi Vidya,

Welcome to the forum!!!

pls refer this

http://www.kilowattsoftware.com/tutorial/rexx/parseTutorial.htm

Thanks,
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Wed Jun 11, 2008 1:09 pm    Post subject: Reply to: parsing the variables with the ~ separator
Reply with quote

waiting for an acknowledgment from the TS in order to move the topic to the proper forum
Back to top
View user's profile Send private message
vidyaa

New User


Joined: 02 May 2008
Posts: 70
Location: chennai

PostPosted: Wed Jun 11, 2008 1:11 pm    Post subject:
Reply with quote

this is to deal with rexx
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Wed Jun 11, 2008 1:26 pm    Post subject: Reply to: parsing the variables with the ~ separator
Reply with quote

why not post to the right forum to start with ?

I' ll move the topic where it belongs
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Jun 11, 2008 2:25 pm    Post subject:
Reply with quote

If the number is unknown and the seperator is stable then I would use TRANSLATE rather than parse.

Count the seperate words left in the string, and do a definitive loop using that count.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts DB2 9.1.0 not move values to Host-Var... Miguel Fernandez DB2 8 Wed Jan 25, 2017 8:24 pm
No new posts DB2 9.1.0 not move values to Host-Var... Miguel Fernandez DB2 0 Wed Jan 25, 2017 8:23 pm
No new posts DB2 9.1.0 not move values to Host-Var... Miguel Fernandez DB2 0 Wed Jan 25, 2017 8:21 pm
No new posts Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm
No new posts Is it possible to pass variables of s... Csongor CLIST & REXX 2 Fri Jun 10, 2016 7:33 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us