> Ivica Brodaric wrote: > >I didn't want to start a war of words about a poor little > Signal, but I cannot resist now. SIGNAL should be used only > if you want to branch to a piece of code from which you will > never come back. In other words, it should be reserved for > *abnormal* changes in the flow of logic. Error handling is > fine. Anything else and you are in danger of creating a > dreaded spaghetti mess.
OK, here's one for the benefit of the newbies in the crowd (wherever
they are). After looking at Chris Buelens' excellent version, I would
highly recommend it. Too bad its not just part of the z/VM distribution
so we don't have this hit and miss problem. The only advantage to my
program is that it is contained in a single exec FWIW.
Ray
-----------------------------------------
/* Menu SFS activities so you don't have to remember */
/* all those commands. */
/* Here are the file systems to manage. You can have up to 9. */
sfss = "VMSYS: VMSYSU: VMSYSR: K8SYSU: "
Do while 1
'VMFCLEAR'
say ' Access Query Maintenance'
say ' Userid Space Commands '
say ' ------ ----- -----------'
do i = 1 to words(sfss)
sfs = justify(word(sfss,i),12)
sel1 = justify(i||'1',13)
sel2 = justify(i||'2',13)
sel3 = justify(i||'3',13)
say sfs sel1 sel2 sel3
end
say
say 'Make 2-digit selection:'
parse pull ans .
ans1 = substr(ans,1,1)
ans2 = substr(ans,2,1)
if ans1 < 1 | ans1 > words(sfss) then exit
fs = word(sfss,ans1)
select
when ans2 = '1' then call Access
when ans2 = '2' then call Query
when ans2 = '3' then call Maint
otherwise leave
end
end
exit
Access:
'VMFCLEAR'
'pipe',
'CMS Q ENROLL USER FOR ALL' fs,
'| drop 1',
'| pad 12',
'| snake 6 1',
'| console'
say
say 'Type the userid to access:'
parse pull user .
'DIRL' fs||user||'.'
return
Query:
'VMFCLEAR'
'Q FILEPOOL MINIDISK' fs
say
say 'Press ENTER to continue.'
parse pull junk
return
Maint:
say 'Examples -'
say ' enroll user <newuser>' fs '(blocks nnnn'
say ' modify user {+/-}nnnn for <curuser>' fs
say
say 'Press ENTER to continue.'
parse pull junk
return
-----------------------------------------------
