View previous topic :: View next topic
|
Author |
Message |
pnr kishore
New User
Joined: 29 May 2008 Posts: 15 Location: CHENNAI
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
pnr kishore
New User
Joined: 29 May 2008 Posts: 15 Location: CHENNAI
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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
Rather than provide (and confuse) the forum with a complete requirement in the beginning, a bit at a time keeps the suspense up. . .
d |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
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. |
|
Back to top |
|
|
|