T.R | Title | User | Personal Name | Date | Lines |
---|
391.1 | HUMMINA, HUMMINA, HUMMINA | RUNTUF::IMFRA | | Tue Jan 22 1991 17:43 | 41 |
| WELL, isn't THIS special!
Assumming (a lot) one has a file similar to the following:
PART_NO QTY EL_BUCKOS
define file partake
totpart_cst/some format = el_buckos * qty;
part_cst/some format = el_buckos * qty;
end
table file partake
sum totpart_cst (used to total cost of all parts)
sum part_cst (used to total cost of each part)
by part_no
on table hold
end
Now we have a hold file which contains each part number, its respective
cost for orders shipped, and the total for all parts shipped
(totpart_cst) on each darn record.
table file hold
sum
compute part_type/a1 = if part_cst le (.8 * totpart_cost) then 'A'
else if part_cst le (.95 * totpart_cost) then 'B'
else 'C';
by part_no
end
Does this resemble, in any way, shape, or form, what were looking for?
I hope this adequately answers your FOC_SOS.
Remember, my old standby, "this SCUD's for you!"
-saddam
|
391.2 | | WMOIS::B_REINKE | she is a 'red haired baby-woman' | Wed Jan 23 1991 16:02 | 6 |
| I dunno, I'll print it out and carry it off to my focus account
and try it out..
thankyou
Bonnie
|
391.3 | | WMOIS::B_REINKE | she is a 'red haired baby-woman' | Fri Jan 25 1991 08:26 | 10 |
| What I really want, after trying this a bit
is some way to do the following (which doesn't work)
define file mumblefratz
total = sum raw_mlp;
and then insert total instead of the numbers in my previous
example..
bj
|
391.4 | ...and a time to every purpose under Heaven. | RUNTUF::IMFRA | | Fri Jan 25 1991 12:48 | 15 |
|
I am not getting your drift. I will need more concrete info in order
to be of assistance. My suggestion would be to (1) include your MASTER
file description, (2) create (with an editor, if necessary) a report
(just a few lines) which shows what is desired -- map any pertinent
fields back to the MASTER -- if the mapping isn't obvious -- in text
following the report.
Also, send the FEX which is currently run.
If you don't send this stuff (in a reply), I will seek you out and
gouge your eyes out for wasting my precious time. After that, you will
join the other Americans in swimming in their own blood!
-Saddam
|
391.5 | | WMOIS::B_REINKE | she is a 'red haired baby-woman' | Fri Jan 25 1991 13:09 | 4 |
| I'll send you the code, if you are for real. The style in
which you write makes me think you are 'putting me on'.
Bonnie
|
391.6 | Have Faith, my child. | RUNTUF::IMFRA | | Fri Jan 25 1991 14:02 | 11 |
|
I AM putting you on with regard to the "Iraqi humor", but not with
regard to getting your question answered. My first reply was a serious
attempt to help you, but your subsequent reply made no reference to
my suggestions, and it didn't seem to correlate well with your initial
request for help.
Send the stuff I asked for and you will gain much wisdom.
-the Ishmir of Schmoe
|
391.7 | | WMOIS::B_REINKE | she is a 'red haired baby-woman' | Fri Jan 25 1991 14:33 | 7 |
| I haven't tried doing what you suggested first, because
if I can define a total it would be easier than rewriting
my whole fex.
I've sent you my fex, do you want to take this to mail?
Bonnie
|
391.8 | I went to a church, I passed along the way. | RUNTUF::IMFRA | | Fri Jan 25 1991 15:51 | 8 |
|
ah, roger, that's a big affirmative, switching to mail in t-minus
5
4
3
2
1
...gone
|
391.9 | | WMOIS::B_REINKE | she is a 'red haired baby-woman' | Mon Jan 28 1991 14:14 | 5 |
| By the way, Joe (?) thanks, your suggestion works...
I'll post the finished fex here for anyone who is intersted.
Bonnie
|
391.10 | What worked | WMOIS::B_REINKE | she is a 'red haired baby-woman' | Mon Jan 28 1991 14:19 | 71 |
| Parts marked by the -* except the comments at the top were the
suggestions that made the file run the way I needed it to.
OFFLINE CLOSE
VMS DELETE ABC.RPT.*
FILEDEF OFFLINE DISK ABC.RPT
-*
-* TO DETERMINE ABC RANKING BY DOLLARS SHIPPED
-*
-*
- PROMPT &CUR_MTH.A9.Enter reporting month:.
- PROMPT &ABR_MTH.A3.Enter abbreviation of reporting month:.
- PROMPT &COMP_MTH.A3.Enter abbreviation of comparision month:.
- SET &FILENAME = 'CUR'||'_'||&ABR_MTH;
- SET &FILENAME1 = &ABR_MTH||'V'||&COMP_MTH||'F';
DEFINE FILE &FILENAME
ACC/D3 = EDIT(PLANNER_ACCY);
END
TABLE FILE &FILENAME
PRINT PN PC ACC
BY PN
IF PLANNER_CODE EQ 20 OR 23 OR 25 OR 24
ON TABLE HOLD AS PC
END
-*
-RUN
-*
JOIN PART_NUMBER IN PC TO PART_ID IN &FILENAME1
-*
DEFINE FILE PC
MLP_TOT/D8 = RAW_MLP;
END
-*
TABLE FILE PC
SUM MLP_TOT
PRINT PART_NUMBER PLANNER_CODE ACC
BY HIGHEST RAW_MLP
IF PART_NUMBER NE ' '
IF RAW_MLP NE ' '
ON TABLE HOLD AS JT
END
-*
-RUN
-*
DEFINE FILE JT
95%TOTAL = .95 * MLP_TOT;
80%TOTAL = .8 * MLP_TOT;
RUNNING_TOT = LAST RUNNING_TOT + RAW_MLP;
CLASS_A_FLAG/A1=IF RUNNING_TOT GE 95%TOTAL THEN 'C' ELSE
IF RUNNING_TOT GE 80%TOTAL THEN 'B' ELSE 'A';
END
TABLE FILE JT
SUM AVE.ACC BY CLASS_A_FLAG
PRINT PART_NUMBER AS 'PART,NUMBER'
PLANNER_CODE AS 'PC'
RAW_MLP AS 'MLP'
RUNNING_TOT
CLASS_A_FLAG AS 'RANK'
ACC AS 'ACCURACY'
BY CLASS_A_FLAG NOPRINT
BY HIGHEST RAW_MLP NOPRINT
HEADING CENTER
"ABC DOLLAR RANKING FOR &CUR_MTH - CURRENT MONTH"
FOOTING
"TOTAL =<MLP_TOT>"
END
|
391.11 | The Forecast Calls for Pain! | HAMSTR::BAMFORTH | | Mon Jan 28 1991 14:22 | 5 |
|
You're welcome, Bonnie. That's one of the nice things about
"multi-verb requests".
Joe
|