Portal | 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: 30
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: 386
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: 30
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: 30
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 TWS PIF (EQQYCOM) Rexx - Occurrence S... Richard Baker IBM Tools 0 Wed Sep 16, 2020 10:45 am
No new posts Call Natural program with rexx shahaf CLIST & REXX 2 Tue Sep 08, 2020 11:22 am
No new posts CA Sysview - JCL or Rexx - Read or Ex... Jasi CA Products 4 Wed Aug 05, 2020 9:19 pm
This topic is locked: you cannot edit posts or make replies. Invoke REXX thru JCL to expand the co... spizen556 CLIST & REXX 2 Sun Jul 26, 2020 3:53 pm
No new posts Unable to scroll in REXX panel KeshavKunal CLIST & REXX 4 Tue Jul 21, 2020 3:55 pm

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