Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
REXX EXECIO STEM No newline

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

New User


Joined: 27 Oct 2015
Posts: 17
Location: United States

PostPosted: Tue Sep 17, 2019 6:07 am    Post subject: REXX EXECIO STEM No newline
Reply with quote

I'm writing to a USS file using EXECIO with STEM out.

The data is written but without the x'15' at the end of each line.

I tried concatenating a '15'x to the end of each stem variable but it still doesn't get written to the output.

Suggestions?

Using syscall works but I was hoping to find an EXECIO solution.
Back to top
View user's profile Send private message

Willy Jensen

Active User


Joined: 01 Sep 2015
Posts: 317
Location: Denmark

PostPosted: Tue Sep 17, 2019 12:41 pm    Post subject:
Reply with quote

did you allocate using FILEDATA(TEXT)?
Back to top
View user's profile Send private message
Harold Barnes

New User


Joined: 27 Oct 2015
Posts: 17
Location: United States

PostPosted: Tue Sep 17, 2019 5:16 pm    Post subject:
Reply with quote

Code:
bb.0 = 7
do i = 1 to bb.0
  bb.i = bb.i || '15'x
  say bb.i
end

"ALLOC FI(OUTDD) PATH('/u/uuuuu/BB/bb.out.bin') " ,
  " PATHDISP(KEEP,DELETE) PATHOPTS(ORDWR,OCREAT) " ,
  " PATHMODE(SIRUSR,SIWUSR) " ,
  " FILEDATA(BINARY) "
"EXECIO * DISKW OUTDD ( FINIS STEM bb."
"FREE FI(OUTDD"
 
call syscalls 'ON'
address syscall
path='/u/uuuuu/BB/bb.out.txt'
'open' path,
       O_rdwr+O_creat+O_trunc,
       660
if retval=-1 then
do
  Say 'file not open, error codes' errno errnojr
  return
end

fd = retval
do j = 1 to bb.0
  rec = bb.j
  'write' fd  'rec' length(rec)
  if retval=-1 then
  do
    say 'record not written, error codes' errno errnojr
    'close' fd
    exit 99
  end
end
'close' fd
exit 0


I've tried:
FILEDATA(BINARY)
FILEDATA(TEXT)
FILEDATA(RECORD)
Back to top
View user's profile Send private message
Harold Barnes

New User


Joined: 27 Oct 2015
Posts: 17
Location: United States

PostPosted: Tue Sep 17, 2019 6:05 pm    Post subject:
Reply with quote

FILEDATA(TEXT) was the solution.

Thanks!
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 Running a REXX exec program using ZOSMF Sakthi344 CLIST & REXX 1 Tue Oct 15, 2019 3:13 pm
No new posts REXX VSAM Harold Barnes CLIST & REXX 2 Sat Oct 05, 2019 2:38 pm
No new posts REXX for Reading SMF type 70-1 AdrielGB Testing & Performance analysis 6 Sat Oct 05, 2019 3:03 am
No new posts Can GLobal variable used under TSOE/REXX Kaliragavendran CLIST & REXX 5 Tue Sep 24, 2019 7:16 am
No new posts REXX and 3270 highlighting Harold Barnes CLIST & REXX 3 Fri Sep 20, 2019 5:26 am

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