home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 7
/
FreshFishVol7.bin
/
bbs
/
misc
/
multiplot-xln-s1.01.lha
/
Multiplot
/
Rexx
/
PointTrunkateSet.mpt
< prev
next >
Wrap
Text File
|
1994-04-17
|
1KB
|
69 lines
/* This script trunkates a data set at a selected point */
port= 'MULTIPLOT.01'
RESULT=''
RC=0
/* Check Multiplot is running */
options results
if(~show('p',port)) then do
say "Please start Multiplot first"
exit 1
end
address value port
/* Check a PLOT WINDOW is active */
'QUERY'
if(rc ~=0) then do
say "QUERY command failed!"
exit 1
end
if(compare('PLOWIN',RESULT)<6) then do
'SAY Please select a PLOT WINDOW first.'
exit 1
end
/* Check one (and no more) Data Set is selected */
'PEEK 2'
if(rc =0) then do
'SAY Please select a single point.'
exit 1
end
'PEEK 1'
if(rc~=0) then do
'SAY Please select a single point.'
exit 1
end
/* Find out point and set numbers */
'LAUNCH'
'QUE'
if(rc ~=0) then do
'SAY ERROR: Failed to query selected point.'
exit 1
end
setno=word(RESULT,8)
pointno=word(RESULT,4)
'STOP'
'SELECT SET' setno
'SELECT REPLACE'
/* Collect values from set */
'PEEK 1 YVALS'
totpoints=WORDS(YVALS)
'SELECT SET' setno
'SELECT POINT' totpoints
'SELECT REPLACE'
i=totpoints-1
do while(i>=pointno)
'SELECT SET' setno
'SELECT POINT' i
'SELECT ADD'
i=i-1
end
'DELETE'