I stuck up in concatinating the year and the month fields. I do have a filed contains the year and an another field with month.
I need to concatenate it in to a single filed. Please do let me know your suggestions.
ThanksThis message has been edited. Last edited by: Kerry,
Webfocus 7.6.8 Windows PDF & Excel
October 29, 2009, 04:14 PM
Francis Mariani
What are the format of the two fields?
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
October 29, 2009, 04:14 PM
FrankDutch
are this numeric fields?
what did you try
Frank
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
October 29, 2009, 05:20 PM
ani
Year field format is yy and month field format is mm.
Thanks
Webfocus 7.6.8 Windows PDF & Excel
October 29, 2009, 05:25 PM
jimster06
You may wish to consider the use of DEFINE; follow the link in the upper right corner for TechDoc. Or use the help feature in WebFOCUS. Look for 'concatentae' or 'concatentation.'
jimster06 DevStu WF 7.6.11 W7 HTML, PDF, EXL2K
October 29, 2009, 05:28 PM
FrankDutch
so both fields are smartdate fields?
if so did you try just this
NEWDATE/YYM=YEARDATE;
Frank
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
October 30, 2009, 12:30 AM
Francis Mariani
quote:
Year field format is yy and month field format is mm.
What is the WebFOCUS format? "mm" is not a valid format.
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
October 30, 2009, 11:16 AM
ani
Hi Francis,
Here is the code that I tried. I got the year and month. I am trying to concatenate YEAR and MONTH fields.
-MRNOEDIT BEGIN TABLE FILE EMPLOYEE PRINT HIRE_DATE -*COMPUTE DATE1/YYMD=HIRE_DATE; NOPRINT -*COMPUTE DATE_FINAL/YYMD=DATEADD(DATE1,'M',-3); COMPUTE YEAR/YY=HIRE_DATE; COMPUTE MONTH/M=HIRE_DATE; -*COMPUTE YEARMONTH/YYM=YEAR|'/'|MONTH; END -MRNOEDIT END
Thanks Ani
Webfocus 7.6.8 Windows PDF & Excel
October 30, 2009, 11:33 AM
jimster06
The statement, COMPUTE YEARMONTH/YYM=YEAR|'/'|MONTH, tells WebFOCUS that the variable is a so-called Smart date. It would appear that you want a character string like the following: YEARMONTH/A7 = YEAR | '/' | MONTH; Note the difference in format.
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat