Is there any way to do this more efficiently. In future i might have cases where there are some more date parameters(Say,Transaction_Start and End Dates)
WF8105M windows 10This message has been edited. Last edited by: FP Mod Chuck,
January 10, 2019, 11:36 AM
BabakNYC
Are you on 8105? There's a bunch of new simplified functions that might help but only available in 82xx.
There are a number of simplified functions in 8105.
Check out the documentation.
Are the dates always in the same position ?, i.e. token number, assuming a semicolon can be trusted.
An example of what you want out the other side would help
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
January 11, 2019, 04:01 AM
Wep5622
You probably need to replace that date "manually", by finding the POSITION() of the strings "FROM_DATE:" and "TO_DATE:" and using the fact that a date is 10 characters long (assuming it can't be left empty).
Armed with that, you can concatenate substrings based on these positions to get the desired string.
I'm sure there are some off-by-one errors in that example, but you get the drift.
WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010 : Member of User Group Benelux :
January 14, 2019, 12:43 PM
Hallway
Assuming that the string will always be semicolon delimited and that the date positions will always be in the third and fourth positions, the following seems to work on my end:
In 8201 there is also a simplified function for replacing a string, simply called REPLACE that would would simplify it further by changing the STRREP with: