IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Writing the Message Read On the screen to file


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
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
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: 8797
Location: Welsh Wales

PostPosted: Tue Sep 08, 2009 8:34 pm
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

Global Moderator


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

PostPosted: Tue Sep 08, 2009 8:35 pm
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Sep 08, 2009 11:35 pm
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

Moderator Emeritus


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

PostPosted: Wed Sep 09, 2009 1:55 am
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Error to read log with rexx CLIST & REXX 11
Search our Forums:

Back to Top