Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Conversion to Legacy Date

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Conversion to Legacy Date
 Login/Join
 
<Rich1002>
posted
In FOCUS, Subject: Conversion to Legacy

Hello all,

Can someone provide the coding to convert:
FIELD=RPT_D ,RPT_D ,MDYY ,DATE
to
YEAR2/A2 = ????;
MONTH2/A2 = ????;

Thanks to all!

This message has been edited. Last edited by: Kerry,
 
Report This Post
<Rich1002>
posted
Addendum:

My Batch FOCUS environment is 7.2.5.

Thanks,

Rich
 
Report This Post
Expert
posted Hide Post
There are many ways to do this and doing a Forum search will identify some. Here is one way.
DEFINE FILE CAR
SMDATE/MDYY=&MDYY;
DATEI/I8MDYY=SMDATE;
DTYY/A2=EDIT(EDIT(DATEI),'$$$$$$99');
DTMO/A2=EDIT(EDIT(DATEI),'$$99');
END
TABLE FILE CAR
PRINT COUNTRY SMDATE DATEI DTYY DTMO
IF RECORDLIMIT EQ 1
END


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
<Rich1002>
posted
Ginny,

Thanks for your input. I tried it as:

DEFINE FILE PLDREFL5
SMDATMDYY/MDYY=RPT_D;
DATEI/I8MDYY=SMDATMDYY;
DTY2/A2=EDIT(DATEI,'$$$$$$99');
DTY4/A4=EDIT(DATEI,'$$$$9999');
DTMO/A2=EDIT(DATEI,'99');
DTDAY/A2 = '01';
RPT_DATE/A8 = DTMO | DTDAY | DTY4;
RPTYM/A8 = 'G'| DTY2 | DTMO |'V00';
FULL/A17 = CHGDAT ('MDYY','MYYX', RPT_DATE, 'A17');
OPTMTH/A70 = '';
END

TABLE FILE PLDREFL5
PRINT RPT_DATE
RPTYM
FULL
OPTMTH
WHERE RECORDLIMIT EQ 15
END

The following error message resulted:
FOC1426) DATA ELEMENT VALUE TOO BIG FOR SEGMENT/FIELD : PLTRP101/RPT_D

which is received if I try to print any of the "derived" fields above.

RPT_D is defined in the MFD as FIELD=RPT_D ,RPT_D ,MDYY ,DATE ,
MISSING=OFF,$

This MFD together with the table works fine in the WebFOCUS environment.

Any suggestions?

Thanks!

Rich
 
Report This Post
Expert
posted Hide Post
Works just fine in my WebFOCUS environment:

DEFINE FILE CAR
SMDATMDYY/MDYY WITH COUNTRY = '11212009';
DATEI/I8MDYY=SMDATMDYY;
DTY2/A2=EDIT(DATEI,'$$$$$$99');
DTY4/A4=EDIT(DATEI,'$$$$9999');
DTMO/A2=EDIT(DATEI,'99');
DTDAY/A2 = '01';
RPT_DATE/A8 = DTMO | DTDAY | DTY4;
RPTYM/A8 = 'G'| DTY2 | DTMO |'V00';
FULL/A17 = CHGDAT ('MDYY','MYYX', RPT_DATE, 'A17');
OPTMTH/A70 = ' '|FULL||' ';
END

TABLE FILE CAR
PRINT 
RPT_DATE
DATEI
DTY2
DTY4
DTMO
DTDAY
RPTYM
FULL
RPTYM
OPTMTH
END


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
Are you running this in a mainframe FOCUS environment as well as a WebFOCUS environment?

Are the Masters the same? There's nothing that's new in the DEFINE statements and they should work in both environments, so the only thing I can think of is that the Masters are different.

Or there is invalid data in the Date column.

(FOC1426) DATA ELEMENT VALUE TOO BIG FOR SEGMENT/FIELD %1%2%3%4

An error occurred when converting a data item for the field in the segment with the names given in the message. Data could not be converted without truncation from the USAGE to the ACTUAL format. FOCERROR is posted to 1426.


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
<Rich1002>
posted
Francis,

Thanks for your input.

This process is being run only on the Mainframe. In WebFocus, there is an app that is running successfully against this table, using the RPT_D field.
The MFDs are identical,as verified by a compare function.

The RPT_D field appears to be fine, based on the success in WebFocus, and the table data - in part:

RPT_D PROD_N ENT_TY_C TX_CT
DATE CHAR(7) CHAR(3) SMALLINT
---PRIMARY PRIMARY PRIMARY- --------
****** **************************** TOP OF DATA *******
000001 01/01/2007 0000208 010 4
000002 01/01/2007 0000208 019 5
000003 01/01/2007 0000208 030 9
000004 01/01/2007 0000216 010 5

Thanks for any further suggestions.

Rich
 
Report This Post
Expert
posted Hide Post
DEFINE FILE CAR
SMDATMDYY/MDYY WITH COUNTRY = '11212009';
DTY2/Y=SMDATMDYY;
DTY4/YY=SMDATMDYY;
DTMO/M=SMDATMDYY;
DTDAY/A2 = '01';
RPT_DATE/A8MDYY = SMDATMDYY;
RPTYM/A8 = 'G'| EDIT(DTY2) | EDIT(DTMO) |'V00';
FULL/A17 = CHGDAT ('MDYY','MYYX', RPT_DATE, 'A17');
OPTMTH/A70 = ' '|FULL||' ';
END

TABLE FILE CAR
PRINT 
RPT_DATE
DTY2
DTY4
DTMO
DTDAY
RPTYM
FULL
RPTYM
OPTMTH
END


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
<Rich1002>
posted
Francis,

Thanks again.

It's resolved - Our FOCUS environment is configured different than the WebFocus environment - hardly optimal. The FOCUS environment doesn't handle DB2 dates. The MFD in FOCUS needed to have (as opposed to DATE for WebFOCUS):
FIELD=RPT_D ,RPT_D ,A10 ,A10
MISSING=OFF,$


The FOCUS code is:
DEFINE FILE PLDREFL5
DTY2/A2 = EDIT(RPT_D,'$$$$$$$$99');
DTY4/A4 = EDIT(RPT_D,'$$$$$$9999');
DTMO/A2 = EDIT(RPT_D,'99');
DTDAY/A2 = '01';
RPT_DATE/A8 = DTMO | DTDAY | DTY4;
RPTYM/A8 = 'G'| DTY2 | DTMO |'V00';
FULL/A17 = CHGDAT ('MDYY','MYYX', RPT_DATE, 'A17');
OPTMTH/A70 = '';
END

I appreciate your help.

Rich
 
Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Conversion to Legacy Date

Copyright © 1996-2020 Information Builders