IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

EXECIO DISKW "successful", but no data written


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Jan 02, 2014 8:06 pm
Reply with quote

Who wants to be my hero . . . ?

Over the last day or so, i have tried several different bits of code and almost all "work", but none actually write in the output datset. I have done something most simple incorrectly icon_confused.gif

I read many topics in our forum and have tried many of the "solutions". Here is one of the attempts - possibly the most simple:
Code:
/*REXX*/                                                             
TRACE I                                                               
                                                                     
" ALLOC DSN("MY.DSLSI.TEST.FILE2") FI(OREC) OLD REUSE "       
                                                                     
 PUSH " SOME DATA TO BE WRITTEN"                                     
  "EXECIO 1 DISKW OREC      (FINIS"                                   
  "FREE FI(OREC)"               


When executed (in batch with a pre-allocated dataset), i get this:
Code:
     4 *-* " ALLOC DSN("MY.DSLSI.TEST.FILE2") FI(OREC) OLD REUSE "     
       >L>   " ALLOC DSN("                                                     
       >L>   "MY.DSLSI.TEST.FILE2"                                     
       >O>   " ALLOC DSN(MY.DSLSI.TEST.FILE2"                           
       >L>   ") FI(OREC) OLD REUSE "                                           
       >O>   " ALLOC DSN(MY.DSLSI.TEST.FILE2) FI(OREC) OLD REUSE "     
     6 *-* PUSH " SOME DATA TO BE WRITTEN"                                     
       >L>   " SOME DATA TO BE WRITTEN"                                         
     7 *-* "EXECIO 1 DISKW OREC      (FINIS"                                   
       >L>   "EXECIO 1 DISKW OREC      (FINIS"                                 
     8 *-* "FREE FI(OREC)"                                                     
       >L>   "FREE FI(OREC)"                                                   
READY                                                                           
END


Attempts with a stem also get the same result.

Where have i gone astray?

Thanks,
d
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Thu Jan 02, 2014 8:14 pm
Reply with quote

You seem not to be enclosing the DSN in single quotes. Is that correct?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Jan 02, 2014 8:25 pm
Reply with quote

Must not have been correct . . . I added the single quotes and Voila - data.

Even though i'd done the allocation in JCL, it still allocated a different dataset with my uid as the first node. D'oh. I'm a bit surprised that the full dsn was not shown in the trace . . . icon_confused.gif

Thanks!

d
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Thu Jan 02, 2014 8:27 pm
Reply with quote

The code very well for me except for one thing I did

I just allocated as ('" "') but in your case the dataset didnt throw any error may be because your dataset exists...

weird icon_eek.gif
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Thu Jan 02, 2014 11:03 pm
Reply with quote

I don't know but maybe the ALLOC in your exec overrides the JCL allocation? I never use ALLOC in a batch rexx - much simpler to to it via JCL.
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Mon Jan 06, 2014 10:17 pm
Reply with quote

Quote:
I'm a bit surprised that the full dsn was not shown in the trace . . .

Adding the prefix is a TSO thing, not a rexx thing. It is all done within the processing of the ALLOC command, so there is nothing that will be captured in the trace.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Jan 07, 2014 12:17 am
Reply with quote

Thanks everyone for the replies.

I'm sure i'll be back . . . icon_cool.gif

d
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Store the data for fixed length COBOL Programming 1
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
No new posts PuTTY - "User is not a surrogate... IBM Tools 5
No new posts Check data with Exception Table DB2 0
Search our Forums:

Back to Top