As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
Input file has date as 02202006 named START_MDYY. I attempt to reformat it to 2006-02-20 using DEFINE to prepare it for bcp load into a sql server table.
The resulting value in the bcp file is 8402-00-03. NOT GOOD. I’m new and appreciate any advice you can offer as to what is happening and how to correct it. Thanks, rvbThis message has been edited. Last edited by: Kerry,
WF 7.1.7 on Win Server 2003 migrating to WF 7.7.04 on Win Server 2008 HTML, RTF, Excel and PDF
It looks like you are trying to use EDIT on a Date formated field. That will produce strange results.
Try the DATECVT function, i.e.:
DEFINE FILE CAR
START_MDYY/MDYY WITH COUNTRY = &MDYY;
START_DATE_YYMD/YYMD = DATECVT(START_MDYY, 'MDYY', 'YYMD');
START_DATE_2/A10 = DATECVT(START_DATE_YYMD, 'YYMD', 'A8YYMD');
END
TABLE FILE CAR
PRINT
START_MDYY
START_DATE_YYMD
START_DATE_2
WHERE READLIMIT EQ 1
END
Robert F. Bowley Jr. Owner TaRa Solutions, LLC
In WebFOCUS since 2001
Posts: 132 | Location: Gadsden, Al | Registered: July 22, 2005
Thanks for the reply and the nice example. When I try it my TABLE FILE fails because it does not recognize START_DATE_2? There must be other issues that I'm not seeing. Will your code example put a - between the date values? Like this YYYY-MM-DD.
WF 7.1.7 on Win Server 2003 migrating to WF 7.7.04 on Win Server 2008 HTML, RTF, Excel and PDF
I'm considering changing MDYY to A8 to see if the EDIT returns what I need. At this point I don't see why I can't treat the input file value of 02202006 as A8 so I can use EDIT. Please advise if I'm looking for trouble. Thank you Waz for replying.
WF 7.1.7 on Win Server 2003 migrating to WF 7.7.04 on Win Server 2008 HTML, RTF, Excel and PDF
I changed the .mas to define START_MDYY as A8 instead of MDYY. This allowed the my original EDIT logic to work as expected (MAJOR thank you to rfbowley for the clue that: EDIT on a Date formated field will produce strange results). That really got me thinking that there was no logical reason that this field needs to be defined as MDYY in my case.
Waz, thanks for the example using compute with YY-M-D. Thank you (all responders) for helping to open my mind to WF coding techinques that I'm lacking and now learning thanks to YOU. Sincerly, rvb
WF 7.1.7 on Win Server 2003 migrating to WF 7.7.04 on Win Server 2008 HTML, RTF, Excel and PDF