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
 

 

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: 2033
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: 4648
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
No new posts Want to pull the job log into a Mainf... Jishu Mukherjee Compuware & Other Tools 9 Tue Mar 21, 2017 4:48 pm
No new posts Amount field is getting corrupted whe... thesumitk SYNCSORT 5 Tue Oct 18, 2016 8:20 pm
No new posts hot to get details when "EXEC CI... Andi1982 CICS 11 Tue Sep 20, 2016 5:01 pm
No new posts Multi row fetch - "for read only... Nileshkul DB2 3 Sun Aug 14, 2016 12:52 am
No new posts "DFSRRC00 vs IKJEFT01" for ... arunsoods All Other Mainframe Topics 5 Fri Aug 12, 2016 9:54 pm


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