Windows .BAT Scripts for Uploading files to z/OS Mainframe

.BAT Coding for z/OS Uploading

As mentioned on Millennial Mainframer.

Here's some glorious nerdry I've been laboring at work to make my and others' lives easier creating Windows .BAT scripts for uploading files to z/OS mainframe.  Before this all this all the declarations for z/OS allocations were manually done and very time consuming.

The code is pretty straight forward once you start playing with it.

Some irritations you'll find with Windows batch files (we're still using XP regretfully) is that while it's not CASE sensitive...there's some strict syntax and limitations.

For example I was struggling with IF ELSE statements which require a strict format; spacing when outputting to a textfile; and using global and local variables within the script which ended up with me creating multiple procedures as a workaround.

Since Batch files in Windows are pretty limited I would have LOVED to use PowerShell.
However I knew that a simple .BAT would at least guarantee to work on our secure workstations.

(Note: The following code below works as presented with spacing and format.)

Continue reading Windows .BAT Scripts for Uploading files to z/OS Mainframe

REXX Message Shenanigans

Here's the REXX EXEC that I made this light Friday as a cheeky message for people trying to run something at work.

As mentioned here on Millennial Mainframer.

/* REXX EXEC */                                                                 
/*============================================================*/                
/* REXX FOR ALLOCATING REQUIRED ISPF DATA SETS AND LIBRARIES  */                
/* FOR TIVOLI DECISION SUPPORT FOR Z/OS (TDSZ)                */                
/*                                                            */                
/*============================================================*/                
/* PAUL GAMBLE - Mar 14 2013                                  */                
/*                                                            */                
/* Workaround for userid.DRLFPROF req.                        */                
/*                                                            */                
/*============================================================*/                
ADDRESS ISPEXEC "VGET (ZUSER)"                                                  
savemem = zuser||'.PROF'                                                    
"ALLOC DA('"savemem"')"                                                         
If rc > 0 Then do                                                               
say '*******************************************************'                 
say '                                                       '                 
say 'INITAL STARTUP OF THE DAY...REPEAT, THE ABOVE MESSAGE  '                 
say 'INDICATING "MISSING DATASET" IS NOW BEING COPIED INTO  '                 
say 'YOUR USERID HLQ.                                       '                 
say '                                                       '                 
say '                                                       '                 
say 'COPYING "SOME.DATASET.PROF" to 'zuser||'.PROF'                 
say '                                                       '                 
say '                                                       '                 
say '                         oooo$$$$$$$$$$$$oooo                             '
say '                      oo$$$$$$$$$$$$$$$$$$$$$$$$o                         '
say '                   oo$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$o         o$   $$ o$   '
say '   o $ oo        o$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$o       $$ $$ $$o$  '
say 'oo $ $ "$      o$$$$$$$$$    $$$$$$$$$$$$$    $$$$$$$$$o       $$$o$$o$   '
say '"$$$$$$o$     o$$$$$$$$$      $$$$$$$$$$$      $$$$$$$$$$o    $$$$$$$$    '
say '  $$$$$$$    $$$$$$$$$$$      $$$$$$$$$$$      $$$$$$$$$$$$$$$$$$$$$$$    '
say '  $$$$$$$$$$$$$$$$$$$$$$$    $$$$$$$$$$$$$    $$$$$$$$$$$$$$  """$$$      '
say '   "$$$""""$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$     "$$$     '
say '    $$$   o$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$     "$$$o   '
say '   o$$"   $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$       $$$o  '
say '   $$$    $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$" "$$$$$$ooooo$$$  '
say '  o$$$oooo$$$$$  $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$   o$$$$$$$$$$$$$$  '
say '  $$$$$$$$"$$$$   $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$     $$$$""""""""     '
say ' """"       $$$$    "$$$$$$$$$$$$$$$$$$$$$$$$$$$$"      o$$$              '
say '            "$$$o     """$$$$$$$$$$$$$$$$$$"$$"         $$$               '
say '              $$$o          "$$""$$$$$$""""           o$$$                '
say '               $$$$o                                o$$$"                 '
say '                "$$$$o      o$$$$$$o"$$$$o        o$$$$                   '
say '                  "$$$$$oo     ""$$$$o$$$$$o   o$$$$""                    '
say '                     ""$$$$$oooo  "$$$o$$$$$$$$$"""                       '
say '                        ""$$$$$$$oo $$$$$$$$$$                            '
say '                                """"$$$$$$$$$$$                           '
say '                                    $$$$$$$$$$$$                          '
say '                                     $$$$$$$$$$"                          '
say '                                      "$$$""                              '
say '                                                                          '
say '        EVERYTHING IS WORKING...                                          '
say '                                                                          ' 
say '        LIFE IS GOOD.                                                     ' 
say '                                                                          ' 
say '        PLEASE ENJOY.'                                                      
say ' '                                                                          
say '*******************************************************'                    
  profmem = "SOME.DATASET.PROF"                                            
  "ALLOCATE DA('"savemem"') NEW SPACE(10,5) DSORG(ps)                            
   RECFM(S) LRECL(80) BLKSIZE(32720)"                                            
  "ALLOC F(SYSUT1)   DA('"profmem"') SHR"                                        
  "ALLOC F(SYSUT2)   DA('"savemem"') SHR"                                        
  "ALLOC F(SYSPRINT) DUMMY"                                                      
  "ALLOC F(SYSIN)    DUMMY"                                                      
  "IEBGENER"                                                                     
  "FREE  F(SYSUT1 SYSUT2 SYSPRINT SYSIN)"                                        
end /* Then do */