Focal Point
VSAM to SQL Date Conversion using DataMigrator

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/1381057331/m/1691075582

May 27, 2008, 10:54 AM
Mike Trout
VSAM to SQL Date Conversion using DataMigrator
Is there a function used to convert VSAM dates (CCYYMMDD) to SQL date format within DataMigrator, or will it convert automatically? Thank you!
May 28, 2008, 08:44 AM
PBrightwell
VSAM is not a format of it's own, it should be either an A8YYMD or an I8YYMD or just YYMD (in the FOCUS master). It should convert as such on it's own.


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
May 28, 2008, 08:48 AM
Jessica Bottone
Mike, although there isn't a function specific to converting VSAM dates to SQL dates, there are LOTS of date functions so I'm sure there is something that will fit your needs. First off, how are the VSAM and SQL dates defined in their corresponding synonyms?


Data Migrator 5.3, 7.1, 7.6
WebFOCUS 7.1, 7.6, 7.7
SQL Server, Oracle, DB2
Windows
May 28, 2008, 09:53 AM
Mike Trout
Thanks for the reply.

VSAM is PIC X(8) format CCYYMMDD
Default format is dd/mm/yyyy for SQL Server.
May 29, 2008, 08:44 AM
Jessica Bottone
I'm sorry Mike. I guess I wasn't specific enough. How is each field defined in its associated Data Migrator synonym?


Data Migrator 5.3, 7.1, 7.6
WebFOCUS 7.1, 7.6, 7.7
SQL Server, Oracle, DB2
Windows
May 30, 2008, 09:00 AM
PBrightwell
A PIC X(8) in COBOL is an A8 in FOCUS. Has a FOCUS/WEBFOCUS master ever been created for this file?


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
May 30, 2008, 09:11 AM
Mike Trout
A co worker has gotten a solution from IBI for DB2, they are switching from DB2 to SQL, but the SQL tables are not yet created, this works for DB2.
HDATE( HINPUT(8, EDIT(BYB_BH, '$99999999'), 8, 'HYYMD'), 'YYMD')