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: 8617
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10374
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 File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am
No new posts Rexx - File tailoring samzee71 CLIST & REXX 10 Thu Nov 30, 2017 10:47 pm
No new posts Moving a PS file as body of a mail! Vignesh Sid JCL & VSAM 4 Tue Nov 21, 2017 9:23 pm
No new posts unable to set RC = 4 when empty file migusd SYNCSORT 1 Tue Nov 21, 2017 1:21 am
No new posts VBS and VB, COBOL syntax is the same ... natt.sut COBOL Programming 3 Sun Nov 12, 2017 6:36 am

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