Hello Frank,
 
After another test here, really what you said run well.
But, the line is showed only when the target is found.
In our case, all is not found (the CBL statement).
 
Thanks
 
Sergio
 


Date: Fri, 7 Jan 2011 10:51:33 -0600
From: [email protected]
Subject: Re: CMDCOB PIPE looking for CBL
To: [email protected]










The easy way to debug a PIPE is to insert a “|CONS”, to see what is in the 
stream at that point in time.
 
For instance inserting it between:
 
'| LOCATE ANYCASE 8-* / CALL /', /* Look for CALL Commands */       
'| SPECS /'pgm.n'/ 1 1-* NW', /* Add File info */                   


Will show if anything was found with the LOCATE step.

 




Frank M. Ramaekers Jr.

 
 




From: The IBM z/VM Operating System [mailto:[email protected]] On Behalf 
Of Sergio Lima
Sent: Friday, January 07, 2011 10:45 AM
To: [email protected]
Subject: CMDCOB PIPE looking for CBL
 
Hello List,
 
We have a program here, got from this list, that is very usefull for us.
Unfortunatelly I don't remember the author of this program, may be Kris...
This program is wrote using PIPE command, and FIND all CALL instructions in all 
programas with FILETYPE of COBOL.
We already use this same program for FIND the EXEC commands in all JCL here, 
and run very well.
Now, We need, locate the CBL commands, and my program don't want work.
The code is here : (A piece)
 
'PIPE (NAME COBCALL ENDCHAR ?)',                                    
'| <' fn ft fm, /* Read COBOL Program */                            
'| SPECS RECNO 1.6 7-72 8', /* Record Number, Record */             
'| NLOCATE 8 /*/', /* Skip Comments */                              
'| LOCATE ANYCASE 8-* / CALL /', /* Look for CALL Commands */       
'| SPECS /'pgm.n'/ 1 1-* NW', /* Add File info */                   
'| C: COUNT LINES', /* Count Records */                             
'| >>' cobcall, /* Write to file */                                 
'? C:',                                                             
'| STRLITERAL APPEND /0/', /* Just in Case */                       
'| VAR RECCNT', /* Record Count */                                  
'' /* End COBCALL */     
 
We already have tried change the CALL by CBL in the line of LOCATE, and also, 
change 8-* to 1-*, and nothing.
 
Please more one time, someone can help us in this question.
 
Thanks very much,
 
Sergio Lima Costa
Sao Paulo - Brazil                                           
_____________________________________________________ This message contains 
information which is privileged and confidential and is solely for the use of 
the intended recipient. If you are not the intended recipient, be aware that 
any review, disclosure, copying, distribution, or use of the contents of this 
message is strictly prohibited. If you have received this in error, please 
destroy it immediately and notify us at [email protected].                  
                     

Reply via email to