Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] date from A8 to YYMD
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] date from A8 to YYMD
 Login/Join
 
Platinum Member
posted
Hai

working in DB2-environment with Datamigrator GUI.
This is my field in input table:
FIELDNAME=ACTU_DAT, ALIAS=ACTU_DAT, USAGE=A8, ACTUAL=A8
An example is '20190105'

It has to be joined with this field in another table:
FIELDNAME=DAT, ALIAS=DAT, USAGE=YYMD, ACTUAL=DATE
Example is '2019-01-05'

In the source transforms calculator I putted this transformation
DATECVT(ACTU_DAT, 'A8', 'YYMD')

But the inner join gives no result.

Where does it go wrong?

Regards
Ron

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS AppStudio 8.2.02M
WebFocus Datamanagement Console 8.1M
DMC
 
Posts: 109 | Registered: August 29, 2014Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Personally I would do the opposite : convert the date into alpha (A8) and then join the two alpha.
Or convert both into integer date (I8YYMD) or alpha date (A8YYMD) and then join them.

You need to be sure that both field have the same format and content.
You problem is probably there where one field doesn't have the exact same format and content then the other.

Have you print them individually to compare and see if they have the same representation ?


WF versions : Prod 8.2.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2072 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Hoi Martin

you give three solutions:
- convert the date into alpha (A8) and then join the two alpha
- convert both into integer date (I8YYMD) and then join them or
- convert both into alpha date (A8YYMD) and then join them.

Can you , as a learning option for me, show the three solutions?


WebFOCUS AppStudio 8.2.02M
WebFocus Datamanagement Console 8.1M
DMC
 
Posts: 109 | Registered: August 29, 2014Reply With QuoteReport This Post
Gold member
posted Hide Post
Hi,
Why dont you change the Usage from A8 to YYMD in the master file rather than converting it.
Is there are reaons you want to keep format as A8 in the master file?


WF 8.2.04
Windows/Unix
All Formats
In Focus since 2006
 
Posts: 74 | Location: UK | Registered: September 17, 2018Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Master file is used in multiple dataflows. I don't know what the effect will be in the other flows by changing the master.


WebFOCUS AppStudio 8.2.02M
WebFocus Datamanagement Console 8.1M
DMC
 
Posts: 109 | Registered: August 29, 2014Reply With QuoteReport This Post
Expert
posted Hide Post
quote:
Master file is used in multiple dataflows

You can add a DEFINE in the synonym and use that without affecting other users...


   See you at Summit! In FOCUS Since 1983 ~ from PC FOCUS to WebFOCUS.
   Currrently using 8204 Gen 48 in Test and Production.
   KGPCo at CenturyLink. October 2017 to Present...
 
Posts: 2967 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Virtuoso
posted Hide Post
quote:
Originally posted by Ronibi:
Hi Martin

you give three solutions:
- convert the date into alpha (A8) and then join the two alpha
- convert both into integer date (I8YYMD) and then join them or
- convert both into alpha date (A8YYMD) and then join them.

Can you , as a learning option for me, show the three solutions?

They are just format conversion and may or may not apply to your situation and/or input format.

You can use DEFINE and apply a DATECVT function to move from A8 to I8YYMD par example or to any other specified format
The important thing is that at the end you are comparing two fields with the same format and content representation.

You should first look at individual field content after transformation and ensure that they can be compared.

It can have plenty of solutions, you need to find the proper one for you


WF versions : Prod 8.2.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2072 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
Expert
posted Hide Post
quote:
quote:
Master file is used in multiple dataflows

You can add a DEFINE in the synonym and use that without affecting other users...



FYI

With Relation DB's, you can have the same field multiple times.

I your case you could have:
FIELDNAME=ACTU_DAT, ALIAS=ACTU_DAT, USAGE=A8, ACTUAL=A8
FIELDNAME=ACTU_YYMD, ALIAS=ACTU_DAT, USAGE=YYMD, ACTUAL=A8


BUT
What is the format of the column in DB2 ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.05OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 6053 | Location: Land of the Darug people, Terra Australis Incognita | Registered: October 31, 2006Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Thnx. The problem in the last answer is that we always do a recreate of a master, not a refresh.
So when I add something in the master, it will be lost once it is recreated because of some other change.

As I said before I already tried DATECVT

In the source transforms calculator I putted this transformation
DATECVT(ACTU_DAT, 'A8', 'YYMD')

But the inner join gives no result


WebFOCUS AppStudio 8.2.02M
WebFocus Datamanagement Console 8.1M
DMC
 
Posts: 109 | Registered: August 29, 2014Reply With QuoteReport This Post
Expert
posted Hide Post
quote:
we always do a recreate of a master
Why do you always do a recreate of a master instead of just refreshing / updating the data?

Does anything change in the master, like fields being added or deleted or format changes?
 
Posts: 2967 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] date from A8 to YYMD

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.