Machine storage exhausted - REXX loop



IBM's Command List programming language & Restructured Extended Executor

Machine storage exhausted - REXX loop

Postby sngxd » Wed Jul 13, 2016 9:15 pm

Hello folks.

Error line is MARKED in the logic below

This is my logic :

"PIPE (end \) < '"MsgFile"' | STEM REC."                                  
 If RC <> 0                                 /*                         */  
  Then Do                                   /*                         */  
      Say "+++ Error" RC "Reading file '"MsgFile"'"                        
      Exit                                  /*                         */  
    End                                                                    
 Say "Retrybad = '"RetryBad"'"                                            
 Parse Value 0 With RetryBad_sw 1 Skipmsg_sw                              
 If 'ABBREV'('YES',retrybad,1)                                            
  Then Parse Value 1 With RetryBad_sw 1 Skipmsg_sw                        
 /*!-------------------------------------------------------------------*/  
 /*! Build the entry into 1 or more messages.  The seperator is        */  
 /*! 5 or more '=' starting in column 1 ('=====').  Also ignore lines  */  
 /*! that begin with '*'.                                              */  
 /*!-------------------------------------------------------------------*/  
 MetaDataString. = ''                       /*                         */  
 cntr = 1                                   /*                         */  
 Do i = 1 To rec.0                          /*                         */  
     If 'LEFT'(rec.i,1) = '*' Then Iterate  /* Skip a comment          */  
     Test = 'LEFT'(rec.i,5)                                                
     If test = '=====' | test = '++++ '                                    
      Then Do                               /* Marker for new record   */  
          If RetryBad_sw                                                  
           Then If test = '++++ '                                          
                 Then Skipmsg_sw = 0                                      
                 Else Do                                                  
                     Skipmsg_sw = 1                                        
                     Iterate                                              
                   End                                                    
          If MetaDataString.cntr <> ''      /*                         */  
           Then cntr = cntr + 1             /*                         */  
          Iterate                           /*                         */  
        End                                 /*                         */  
     If Skipmsg_sw Then Iterate                                            
     rec.i = 'STRIP'(rec.i,'B')                                            
     If 'WORDPOS'('LEFT'(rec.i,1),"< =") = 0                              
      Then rec.i = ' 'rec.i                 /* Add a leading blank     */  
     MetaDataString.cntr = MetaDataString.cntr||rec.i                 <<< ERROR LINE  : Machine Storage exhausted
   End                                                                    
 If MetaDataString.cntr = '' Then cntr = cntr - 1;                        
 MetaDataString.0 = cntr                                                  



Anyone could help me ?

Thank so so so so much in advance.
sngxd
 
Posts: 14
Joined: Fri May 20, 2016 8:39 am
Has thanked: 0 time
Been thanked: 0 time

Re: Machine storage exhausted - REXX loop

Postby Pedro » Wed Jul 13, 2016 9:35 pm

Can you provide sample data? How many total records are there? How many records are processed before it fails? What is your region size?
Pedro Vera
User avatar
Pedro
 
Posts: 684
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times

Re: Machine storage exhausted - REXX loop

Postby sngxd » Thu Jul 14, 2016 12:18 am

Helo Pedro.

Thanks for your quick reply

The data have 163 thousand lines.

First a try send the all data and worked successfully. However I had to insert the <br/> in order to have a break line in the application that receives, so I did it using overlay in the file... then after that when I tried execute again the problem I noticed the error : machine storage exhausted , probably the stem is causing that..?
sngxd
 
Posts: 14
Joined: Fri May 20, 2016 8:39 am
Has thanked: 0 time
Been thanked: 0 time

Re: Machine storage exhausted - REXX loop

Postby Pedro » Thu Jul 14, 2016 5:16 am

had to insert the <br/> in order to have a break line in the application that receives, so I did it using overlay in the file

I do not see any sign of <br/> nor of overlay in the source you provided... it seems that you asked us to help debug the version that works. It is sort of waste of our time.

I noticed the error : machine storage exhausted ,probably the stem is causing that..?

My first guess is that you are doing the overlay incorrectly.

The data have 163 thousand lines.

My second guess is that 163 thousand lines is causing that. Rather than reading the whole data set at once, use EXECIO to read the data set in smaller chunks.
Pedro Vera
User avatar
Pedro
 
Posts: 684
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post