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
 
Basic "SAY/PULL/DISKW" pgm. Need help tho...

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

New User


Joined: 27 Jan 2009
Posts: 26
Location: toronto

PostPosted: Tue Feb 10, 2009 11:29 pm    Post subject: Basic "SAY/PULL/DISKW" pgm. Need help tho...
Reply with quote

the program is to
1) display(say) a few questions on the screen,
2) reads(pull) the answers given
3) appends (diskw shr reuse) the answers to an existing FB-80 flat file. the flat file grows by 1 new record everytime this rexx pgm executes on demand.

my question is how to code(#3) so that all the answers(variables) typed on the screen are written to the file in one line separated by a space, as one record?
Back to top
View user's profile Send private message

Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2083
Location: Silicon Valley

PostPosted: Tue Feb 10, 2009 11:41 pm    Post subject: Reply to: Basic "SAY/PULL/DISKW" pgm. Need help
Reply with quote

concatenate the variables. example:
Code:

a = 'Pedro'
b = '123 Any Street'
c = 'Hometown, USA'
 
d = a b c

The use EXECIO to append to the file
Back to top
View user's profile Send private message
Kevin Santos

New User


Joined: 27 Jan 2009
Posts: 26
Location: toronto

PostPosted: Wed Feb 11, 2009 12:15 am    Post subject:
Reply with quote

d = a b c
how do i get d to OUTREC ?

"ALLOC FI(OUTREC) DA('kEVINS.OUTPUT') SHR REUSE"
"EXECIO * DISKW OUTREC ( FINIS"
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: Wed Feb 11, 2009 12:29 am    Post subject: Reply to: Basic "SAY/PULL/DISKW" pgm. Need help
Reply with quote

If you're APPENDING to a dataset, then you need to specify MOD for the disposition:

ALLOC FI(OUTREC) DA('KEVINS.OUTPUT') MOD REUSE in TSO/E or
//OUTREC DD DSN=KEVINS.OUTPUT,DISP=MOD in JCL.

If you PULL data into the stack, then you PUSH it back out:

...
PUSH a b c
"EXECIO 1 DISKW OUTREC"
...
Back to top
View user's profile Send private message
Kevin Santos

New User


Joined: 27 Jan 2009
Posts: 26
Location: toronto

PostPosted: Wed Feb 11, 2009 12:41 am    Post subject:
Reply with quote

superk, i coded the push and the exact execio stmt
ok it's writing something, actually writing a blank line.
Back to top
View user's profile Send private message
Kevin Santos

New User


Joined: 27 Jan 2009
Posts: 26
Location: toronto

PostPosted: Wed Feb 11, 2009 2:12 am    Post subject:
Reply with quote

Nevermind. fixed my code:

FYI: this worked -
ANSWERS.1 = ans1 ans2 ans3
"ALLOC FI(OUTREC) DA('KEVINS.OUTPUT') MOD REUSE"
"EXECIO" 1 "DISKW OUTREC (STEM ANSWERS."
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
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am
No new posts Changeman get multiple "Browse C... elixir1986 Compuware & Other Tools 4 Fri Jul 14, 2017 1:48 am
No new posts Include/omit with "ALL" pa... mgl DFSORT/ICETOOL 6 Wed Jun 14, 2017 2:31 pm
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts RC 20 for Address ISPEXEC "ISRED... pkmurali CLIST & REXX 3 Sun Apr 16, 2017 11:30 pm

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