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: 18
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: 328
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: 18
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: 18
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 Trap a CP command message in Rexx zVM jeffery CLIST & REXX 1 Wed Dec 11, 2019 10:52 pm
No new posts how to show the class of an ims trans... Renato Zangerolami CLIST & REXX 6 Fri Dec 06, 2019 6:50 pm
No new posts Rexx to create VSAM define statements Dinesh Mani CLIST & REXX 9 Fri Nov 29, 2019 9:26 pm
No new posts Bad arithmetic conversion when assign... Ajay Baghel CLIST & REXX 4 Tue Nov 26, 2019 11:29 am
No new posts Retrieving IMS message processing reg... tneelakandan CLIST & REXX 7 Fri Nov 22, 2019 7:23 pm

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