Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Writing the Message Read On the screen to file

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

New User


Joined: 29 May 2008
Posts: 15
Location: CHENNAI

PostPosted: Tue Sep 08, 2009 8:30 pm    Post subject: Writing the Message Read On the screen to file
Reply with quote

Hi,

Can anybody give me a solutuion of how to Receive data entered by user
and to write the same to the File.

For Eg:,
Code:

/*rexx*/
Say 'Enter the Content of the Message to be delivered'
Pull Message.

In the Above Scenario , when the user enters the Message over the screen,then the message should be read and captured to the Mainframe Dataset.
Back to top
View user's profile Send private message

expat

Global Moderator


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

PostPosted: Tue Sep 08, 2009 8:34 pm    Post subject:
Reply with quote

Well, you have the message, all you need now is to use ALLOCATE and EXECIO to write it to where you want
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Tue Sep 08, 2009 8:35 pm    Post subject: Reply to: Writing the Message Read On the screen to file
Reply with quote

PUSH it to the stack and write it:

/*rexx*/
Say 'Enter the Content of the Message to be delivered'
Pull Message
Push Message
"EXECIO 1 DISKW ddname (FINIS"
...
Back to top
View user's profile Send private message
pnr kishore

New User


Joined: 29 May 2008
Posts: 15
Location: CHENNAI

PostPosted: Tue Sep 08, 2009 11:18 pm    Post subject:
Reply with quote

Thanks for that..
But i also need to split the input stream into several lines.

for example if kishore;raghu;ravi;ramu are entered then in the output file
should contain

kishore
raghu
ravi
ramu

kindly advice.
Back to top
View user's profile Send private message
enrico-sorichetti

Senior Member


Joined: 14 Mar 2007
Posts: 10478
Location: italy

PostPosted: Tue Sep 08, 2009 11:35 pm    Post subject: Reply to: Writing the Message Read On the screen to file
Reply with quote

first of all it would be nice if everybody expressed all the requirements when starting the thread...

for the parsing here is a hint
Code:
string = "aaa;bbb;ccc;dd ee;f g h;i"
do   until ( string = "" )
   parse var string token ";" string
   say left(">"token"<",10) string
end
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Sep 09, 2009 1:55 am    Post subject: Reply to: Writing the Message Read On the screen to file
Reply with quote

Hi Enrico,

Quote:
first of all it would be nice if everybody expressed all the requirements when starting the thread...
The forum has evolved to JIT (Just in Time) processing icon_smile.gif

Rather than provide (and confuse) the forum with a complete requirement in the beginning, a bit at a time keeps the suspense up. . . icon_rolleyes.gif

d
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Wed Sep 09, 2009 2:45 am    Post subject:
Reply with quote

Quote:
Rather than provide (and confuse) the forum with a complete requirement in the beginning, a bit at a time keeps the suspense up. . .
Also, good practice for when being paid by the hour instead of the job. icon_lol.gif
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 B059 PREMATURE END OF FILE mvmadhuvenkatesh CA Products 5 Tue Jun 19, 2018 10:50 am
No new posts Formating output file Niki DFSORT/ICETOOL 3 Fri Jun 15, 2018 3:27 pm
No new posts Need help on TDQ load from file using... subratarec CICS 4 Wed Jun 13, 2018 11:32 pm
No new posts To Understand EXECIO Read Parameter OPEN Ilavenil CLIST & REXX 2 Tue May 29, 2018 1:59 pm
No new posts How to Count a particular record in a... Mounika Nemani DFSORT/ICETOOL 5 Tue May 29, 2018 1:07 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us