Continuation Characters ( - and + ) in zOS Handler Script

Continuation Characters - and + in z/OS Handler Script

Continuation characters ( - and + ) are useful when you want to execute a script line that is longer than your available z/OS character space. The - character will preserve trailing spaces in your line. The + character will not preserve trailing spaces in your line.

This example shows the use of + to concatenate a command line or a word within a z/OS script without a space as the use of - to continue a line of script where a space is required within the same z/OS handler script.


The following z/OS handler script:

 begin_script                
 stmt "ls -a >dir +         
 file"           
 stmt "uemFName=`basename \u201c$UEMORIGFILE\u201d | sed 's/\(.*\)+  
 \.\(.*$\)/\1/'`"    
 stmt "fname=$uemFName.$dt.$tm.$pid.txt"      
 stmt " ls -al >dir+         
 data"        
 stmt "ls -a -       
 >new+
data"   
 end_script        

Will produce the following output when loaded to the uemh.db:

Handler ID...................: MFCTRIGGER_1
Handler Type.................: SCRIPT
Max Acceptable Return Code...: 0
Encrypted User File..........:
User ID......................: mfc1a
Script statements:
 ls -a >dirfile
 uemFName=`basename \u201c$UEMORIGFILE\u201d | sed 's/\(.*\)\.\(.*\)/\1/'`
 fname=$uemFName.$dt.$tm.$pid.txt
  ls -al >dirdata
  ls -a  >newdata
Script Type..................: bat
Command Line Options.........: 
Last Modified On.............: 06/11/1 01:25:20 PM
Last Modified By.............: mfc1a

Components

Universal Event Monitor Manager for z/OS