×
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.
I wholeheartedly agree with you Jon. I showed him how to create his own
function to do it (in RPG) via the link here
http://faq.midrange.com/data/cache/185.html
And you suggested he could create his own function in Cobol. However,
he's reading between the lines that we are saying something else.
So, if he wants to do something like
Select Salary, Formatted(Salary)
from payrate
where EmployeeNumber = :wEmployeeNumber;
He can build his own "Formatted" function that could take a number and
format it to his fondest wishes. Upon doing so he could then imbed the
above select statement into any program (RPG, COBOL, etc) that his little
heart desires.
The basic concept is that you use a CREATE FUNCTION like this
create function QGPL/FORMATTED (DEC (11,2))
returns CHAR(15)
language rpgle (or cobol or ...)
deterministic
no sql
returns null on null input
no external action allow parallel
simple call
external name 'LIBRARY/PROGRAM(SUBPROCEDURE or whatever a subprocedure
is called in Cobol)'
This function would allow you to pass in a 11.2 number (gosh, I can't even
remember how to 'PIC' that). The function would then format it as
xxx,xxx,xxx.xx-
That's why the CHAR(15).
Quite Easily Done.
Rob Berendt
As an Amazon Associate we earn from qualifying purchases.