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
 

 

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: 8593
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: 4648
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am


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