On jBASE 4.1.5 and above :

Basic Program :

INCLUDE jQLProperties.h
options= JQLOPT_USE_SELECT
READLIST sellist FROM '' ELSE
 sellist = ''
 options = 0
END
error = ''

CRT 'Command : ':
INPUT cmd
IF BYTELEN(cmd) ELSE STOP

status = JQLCOMPILE(statement, cmd,options,error)
IF status < 0 THEN STOP error
status = JQLGETPROPERTY(prop, statement,0,STMT_PROPERTY_LPTR)
IF BYTELEN(prop) THEN PRINTER ON
status = JQLEXECUTE(statement,sellist)
IF status THEN
  CRT 'JQLEXECUTE failed'
  STOP
END
LOOP WHILE JQLFETCH(statement, control, data) > -1 DO
  IF data<3> THEN ;!for Simons specific example of 'TOTAL
2' ( displayed in 'column 3' ( data<3> )) being non zero
* add criteria for limiting the displayed values as required
    PRINT data<1>,data<2>,data<3>
  END
REPEAT

***

For Simons' example enter :

   SORT TRANSACTIONS BY DATE BREAK-ON DATE "'VL'" TOTAL 2 (D)

when prompted at the 'Command :' prompt above

On 26 Sep, 12:00, Simon Verona <[email protected]> wrote:
>   Hi all
>
> This may or may not be a stupid question.
>
> I have a transaction file, with many thousands of entries in, which
> should total zero both on a daily basis (there is a date field in the
> file) and overall.
>
> If I have a problem, then a check is to find which dates do not come
> back to zero...
>
> So, I execute a jQL query like :
>
> SORT TRANSACTIONS BY DATE BREAK-ON DATE "'VL'" TOTAL 2 (D)
>
> Which produces a list like  :
>
>                 02/07/2010       0.00
>                 01/07/2010       0.00
>                 30/06/2010       0.00
>                 29/06/2010    -585.31
>                 28/06/2010       0.00
>                 27/06/2010       0.00
>                  etc etc
>
> All I want to see though is the dates that don't come to zero....
>
> Can this be done using jQL?
>
> Thanks
> Simon

-- 
Please read the posting guidelines at: 
http://groups.google.com/group/jBASE/web/Posting%20Guidelines

IMPORTANT: Type T24: at the start of the subject line for questions specific to 
Globus/T24

To post, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en

Reply via email to