× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



do you need the $, when used inside of a function?

> -----Original Message-----
> From: Peter Vidal [SMTP:Peter_Vidal@xxxxxxxx]
> Sent: Tuesday, November 04, 2003 10:40 AM
> To:   midrange-l@xxxxxxxxxxxx
> Subject:      @DTW_SUBTRACT Question
> 
> Hi list!
> 
> I have this @DTW_SUBTRACT function that is blowing up wit hthe message:
> NET.DATA
> Error: Function call to DTW_SUBTRACT failed. Error Number is 4001.
> Obviously,
> this is the message when one of the parameters is not a number.  I am
> printing
> V3 and V4 and they are displayed as a number.  The last statement of this
> code
> is the one that explodes.  In this case, BUDGET is "0" and the expenses is
> "5,519-", but I can't substract the BUDGET from the DISBURSEone.   Before
> calling the SQL1 function, I am executing @DTW_ASSIGN(DTW_EDIT_CODES,"
> JJJJ")
> to format the fields.  That is why the expenses amount has a format with
> commas
> in it.
> 
> Please check these code and see if I am skipping something...
> 
> %FUNCTION(DTW_SQL) sql1(OUT t1) {
> SELECT DEPARTMENT, DEPTNAME, INTEGER(SUM(BUDGET)), INTEGER(SUM(DISBURSE))
> FROM $(library).XDBUDGT
> WHERE RECORDTYPE = '$(ptd)' AND FISYEAR = $(syr) AND FISQTR <= $(fqtr)
> $(locwhere)
> GROUP BY DEPARTMENT, DEPTNAME
> ORDER BY DEPARTMENT, DEPTNAME
> %REPORT {
> <center>
>   <table border=3>
>     <tr>
>      <th>Dept</th>
>      <th>Description</th>
>      <th>Budget</th>
>      <th>Expenses</th>
>      <th>Variance<br>Over/<font
> color="red">Under</font><br>Budget<br>$(rt)</th>
>      <th>Percent<br>Over/<font
> color="red">Under</font><br>Budget<br>$(rt)</th>
>     </tr>
> %ROW {
>     <tr>
>      <td>
>       <a
> href=xdbudacct/Report?dpt=$(V1)&fyr=$(fyr)&dptn=@DTW_rURLESCSEQ(V2)&syr
> =$(syr)&loc=$(loc)&view=$(view)&subview=D&selyr=$(selyr)&fqtr=$(fqtr)&as40
> 0fmm
> =$(as400fmm)>$(V1)</a>
>      </td>
>      <td>
>       %if ($(V2) == "")
>         &nbsp;
>       %else
>         <small>$(V2)</small>
>       %endif
>      </td>
>      <td align=right>$(V3)</td>
>      <td align=right>$(V4)</td>
>      <td align=right>
>         @dtw_subtract($(V4), $(V3), vary)
> 
> 
> Peter Vidal
> Pall Aeropower Corp.
> SR Programmer Analyst
> WWW.Pall.com
> 
> "A good player makes himself look good; a great player makes the team look
> good."
> Author unknown
> 
> 
> _______________________________________________
> This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
> list
> To post a message email: MIDRANGE-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/midrange-l
> or email: MIDRANGE-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/midrange-l.
This e-mail message, including any attachments, is for the sole use of the
intended recipient(s) and may contain confidential or privileged
information.  Any unauthorized review, use, disclosure or distribution is
prohibited.  If you are not the intended recipient, please contact the
sender by reply e-mail and destroy the message.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.