Thanks to all who responded. Kris's solution worked best for my problem. "PIPE < JIMS TESTFILE A ", "| SPECS PRINTONLY EOF N: W3 . SET #0+=N EOF PRINT #0 1 ", "| STRIP", "| VAR TOTAL"
Thomas' TABULATE solution also worked: "PIPE < JIMS TESTFILE A ", "| SPECS WORD 3 ", "| TABULATE SUM 1-9 ", "| STRIP", "| VAR TOTAL" I must issue PIPE AHELP SPECTUT to learn more about this SPECS feature. Jim -----Original Message----- From: The IBM z/VM Operating System [mailto:ib...@listserv.uark.edu] On Behalf Of Kris Buelens Sent: Wednesday, April 29, 2009 2:27 PM To: IBMVM@LISTSERV.UARK.EDU Subject: Re: Using PIPE to SUM a Column Untested: PIPE .... |SPECS PrintOnly EOF n: w3 . set #0+=n EOF Print #0 1| .... Issue PIPE AHELP SPECTUT to learn more about this SPECS feature 2009/4/29 Huegel, Thomas <thue...@kable.com>: > There is a pipe stage on the VM download page TABULATE that will do > exactly what you want. > > -----Original Message----- > From: The IBM z/VM Operating System [mailto:ib...@listserv.uark.edu] On > Behalf Of James Stracka (DHL US) > Sent: Wednesday, April 29, 2009 4:05 PM > To: IBMVM@LISTSERV.UARK.EDU > Subject: Using PIPE to SUM a Column > > I have a file that has numeric data in column 3 that I want to sum. > > Not realizing there was no PIPE SUM stage I tried: > > PIPE < JIMS TESTFILE A | SPECS WORD 3 | SUM | VAR TOTAL > > Which of course gave: > > FPLSCB027E Entry point SUM not found > FPLSCA003I ... Issued from stage 4 of pipeline 1 FPLSCA001I ... Running > "SUM" > Ready(-0027); T=0.01/0.01 13:44:13 > > > Is there a way to SUM the data within a PIPE instead of doing: > > PIPE < JIMS TESTFILE A | SPECS WORD 3 | STEM VALUE. > Total = 0 > Do ix = 1 to value.0 > Total = total + value.ix > end > -- Kris Buelens, IBM Belgium, VM customer support