/* REXX */ Parse Arg Inparm If Inparm = '' then , Inparm = "'SYS1.PARMLIB(BPXPRM00)'" /* this EXEC is intended to be used from TSO */ /* it parses MOUNT statements in BPXPRMxx */ Say 'Using 'Inparm' as input source' sysname = mvsvar('SYMDEF', 'SYSNAME') Say 'System name='sysname lsys = Length(sysname) /* MOUNT commands are issued */ /* if file system is already mounted, then that */ /* MOUNT will fail */ x = Listdsi(Inparm) If x > 4 then Do Say 'Problem accessing 'Inparm Say sysmsglvl2 Exit 8 End Address TSO 'ALLOC FI(PARMIN) REU DA('Inparm') INPUT SHR' 'EXECIO * DISKR PARMIN 1 (STEM parm. FINIS)' If RC \= 0 then Do Say 'Problem reading input parms' Exit 8 End comment = 0 /* not doing a comment */ mount = 0 /* not doing a mount */ mrc = 0 /* initialize rc */ Do i = 1 to parm.0 parmline = Substr(parm.i,1,72) If parmline = ' ' then blank = 1 Else blank = 0 If \comment then Do /* not doing a comment */ Parse Var parmline parmval '/*' comtext '*/' rest If comtext \= '' & rest == '' then comment = 1 If rest \= '' then Do Parse Var rest . '/*' comtext '*/' rest If \comment & comtext \= '' & rest == '' then comment = 1 End End Else Do /* doing a comment */ Parse Var parmline '*/' parmtmp If parmtmp \== '' then comment = 0 Parse Var parmtmp parmval '/*' comtext '*/' rest If \comment & comtext \= '' & rest == '' then comment = 1 End Parmval = Strip(Parmval) If parmval \= '' then Do If Word(parmval,1) = 'MOUNT' then Do mount = 1 mntcmd = '' End If Word(parmval,1) = 'ROOT' then Do mount = 1 mntcmd = '' parmval = "MOUNT "SUBWORD(parmval,2)" MOUNTPOINT('/')" End End Else If mount & blank then Do Say parmline sysix = Pos('&SYSNAME.', mntcmd) If sysix \= 0 then , /* substitute for SYSNAME */ mntcmd = Substr(mntcmd,1,sysix-1)||sysname||, Substr(mntcmd,sysix+9) Say 'Issuing 'mntcmd Address TSO , mntcmd If RC > 4 then mrc = RC If RC = 4 then Say 'Asynchronous mount command performed' mount = 0 End If mount then , mntcmd = mntcmd' 'parmval End i If mrc \= 0 then Say 'One or more mount commands failed' Exit mrc