I would suggest that you read up on EXECIO * DISKW and stems

You will figure it out if you look at the file that got the E37

On Mon, 26 Aug 2013 14:21:18 -0400 George Shedlock <geo...@shedlock.org>
wrote:

:>Gentle Listers;
:>
:>I am trying to write a Rexx routine that takes in 3 arguments. First is DSN, 
second is Member name, third is a string of text. The string of text is the 
concatenation of lines delimited by a ";". (ex. "line1;line2;line3").
:>
:>This code fails:
:>
:>Write_Member:                                                           
:>  MyDSN = ARG(1)                                                        
:>  MyMember = ARG(2)                                                     
:>  MyArg = ARG(3)                                                        
:>  outstem.=0                                                            
:>  dsnname = MyDSN || '(' || MyMember || ')'                             
:>  Say 'The dsname is: {'dsnname'}'                                      
:>  do forever                                                            
:>      parse var MyArg  thisword ';' MyArg                               
:>      if thisword='' then leave                                         
:>      thisword = Left(thisword,80)                                      
:>      parse value outstem.0+1 thisword with t outstem.t =1 outstem.0 .  
:>      end                                                               
:>  Say 'Number of lines written: 'outstem.0                              
:>  "ALLOC DA('"dsnname"') F(Pdsout) OLD REUSE"                           
:>  "EXECIO * DISKW Pdsout (STEM outstem. FINIS"                          
:>  "FREE F(Pdsout)"                                                      
:>  Return                                                                
:>
:>Failure:
:>
:>The dsname is: :HLQ.TEST(MEM3):                                               
:>Number of lines written: 3                                                    
   
:>ACC20210-A ADDVOL FOR DD=PDSOUT DSN=HLQ.TEST VOL=S92248 POOL=TSOPOOL EXT=16   
:>ACC20628-A DATA SET IS PARTITIONED                                            
   
:>System abend code E37, reason code 00000004.                                  
   
:>Abend in host command EXECIO or address environment routine TSO.              
   
:>EXECIO error while trying to GET or PUT a record.                             
   
:>
:>This code works:
:>
:>Write_Member:                                                              
:>  MyDSN = ARG(1)                                                           
:>  MyMember = ARG(2)                                                        
:>  MyArg = ARG(3)                                                           
:>  outstem.=0                                                               
:>  dsnname = MyDSN || '(' || MyMember || ')'                                
:>  Say 'The dsname is: {'dsnname'}'                                         
:>  "ALLOC FI(PDS) DA('"dsnname"') OLD reuse"                                
:>  do forever                                                               
:>      parse var MyArg  thisword ';' MyArg                                  
:>      if thisword='' then leave                                            
:>      thisword = Left(thisword,80)                                         
:>      parse value outstem.0+1 thisword with t outstem.t =1 outstem.0 .     
:>      PUSH thisword                                                        
:>      "EXECIO 1 DISKW PDS "                                                
:>      end                                                                  
:>  "EXECIO 0 DISKW PDS (FINIS"                                              
:>  Say 'Number of lines written: 'outstem.0                                 
:>  "FREE FI(PDS)"
:>   Return            
:>
:>The objective is to pass a stem for the third argument. 
:>
:>Any suggestions on how to use the Execio with the stem value?
:>
:>Show me the error of my ways.
:>
:>George                                                          
:>
:>
:>
:>
:>
:>----------------------------------------------------------------------
:>For IBM-MAIN subscribe / signoff / archive access instructions,
:>send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
Binyamin Dissen <bdis...@dissensoftware.com>
http://www.dissensoftware.com

Director, Dissen Software, Bar & Grill - Israel


Should you use the mailblocks package and expect a response from me,
you should preauthorize the dissensoftware.com domain.

I very rarely bother responding to challenge/response systems,
especially those from irresponsible companies.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to