home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Oakland CPM Archive
/
oakcpm.iso
/
cpm
/
database
/
kphandyp.lbr
/
DECISION.CZD
/
DECISION.CMD
Wrap
OS/2 REXX Batch file
|
1987-07-06
|
2KB
|
101 lines
ERAS
USE decision
DELE all
PACK
@ 2,0 say 'DECISION SUPPORT TOOL'
@ 18,0 say '------------------------------------------------------------------------------'
@ 19,0 say 'Enter up to 12 decision considerations in spaces above. Order of importance is'
@ 20,0 say 'not important. Press RETURN in an unused space to complete making your entries.'
STOR 1 to line
DO WHIL line<13
@ line+3,0 say line using '##'
STOR line+1 to line
ENDD
STOR 1 to line
DO WHIL line<13
STOR ' ' to entry
@ line+3,4 get entry
READ
IF trim(entry)=' '
STOR line-1 to count
STOR 13 to line
ELSE
STOR line+1 to line
GOTO bottom
APPE BLAN
REPL item with entry
ENDI
ENDD
IF trim(entry)#' '
STOR line-1 to count
ENDI
@ 19,0
@ 20,0
@ 19,0 say 'Now you will be asked to specify the greater of importance one by one of each'
@ 20,0 say 'consideration against all the others. Please press RETURN to begin ranking...'
?
WAIT to return
@ 19,0
@ 20,0
@ 22,0
@ 19,0 say 'What is the greater of importance to you between...'
STOR 1 to number
SET intensity off
DO WHIL count#1
GOTO number
@ 20,0 say number using '##'
@ 20,4 say item
SET intensity on
STOR len(trim(item)) to length
@ 20,length+5 say 'and '
SET intensity off
SKIP
DO WHIL .not. eof
STOR 0 to select
STOR # to position
@ 20,length+9 say # using '##'
@ 20,length+12 say item;
@ 20,length+len(trim(item)) say '?'
@ 21,0 say ' '
INPU 'Your selection' to select
GOTO select
REPL rate:sum with rate:sum+1
@ number+3,3*position+40 say select using '##'
@ 20,length+8
@ 22,15
GOTO position
SKIP
ENDD
STOR count-1 to count
STOR number+1 to number
@ 20,0
ENDD
@ 19,0
@ 20,0
@ 22,0
SET intensity on
@ 19,0 say 'Ranking considerations - please wait...'
sort on rate:sum to sortfile descending
USE sortfile
STOR 1 to line
DO WHIL line<13
@ line+3,0
STOR line+1 to line
ENDD
@ 19,0 say 'Considerations rank as above - press RETURN to return to menu...'
SET intensity off
@ 20,0
STOR 1 to line
DO WHIL .not. eof
@ line+3,0 say line using '##'
@ line+3,4 say item
STOR line+1 to line
SKIP
ENDD
SET intensity on
@ 20,0 say ' '
WAIT to return
USE decision
DELE file sortfile
RETU