IB - Developer Center    Forums  Hop To Forum Categories  iWay Products    VSAM to SQL Date Conversion using DataMigrator
Go
New
Search
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Member
Posted
Is there a function used to convert VSAM dates (CCYYMMDD) to SQL date format within DataMigrator, or will it convert automatically? Thank you!
 
Posts: 7 | Registered: April 01, 2008Reply With QuoteEdit or Delete MessageReport This Post
Guru
Posted Hide Post
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 5.3.2 AIX, NT, AS/400, Focus AS/400, AIX, Oracle, JDE, DB2, Lotus Notes
 
Posts: 429 | Location: TX | Registered: September 25, 2007Reply With QuoteEdit or Delete MessageReport This Post
Gold member
Posted Hide Post
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?
 
Posts: 79 | Registered: January 18, 2007Reply With QuoteEdit or Delete MessageReport This Post
Member
Posted Hide Post
Thanks for the reply.

VSAM is PIC X(8) format CCYYMMDD
Default format is dd/mm/yyyy for SQL Server.
 
Posts: 7 | Registered: April 01, 2008Reply With QuoteEdit or Delete MessageReport This Post
Gold member
Posted Hide Post
I'm sorry Mike. I guess I wasn't specific enough. How is each field defined in its associated Data Migrator synonym?
 
Posts: 79 | Registered: January 18, 2007Reply With QuoteEdit or Delete MessageReport This Post
Guru
Posted Hide Post
A PIC X(8) in COBOL is an A8 in FOCUS. Has a FOCUS/WEBFOCUS master ever been created for this file?


Pat
WF 5.3.2 AIX, NT, AS/400, Focus AS/400, AIX, Oracle, JDE, DB2, Lotus Notes
 
Posts: 429 | Location: TX | Registered: September 25, 2007Reply With QuoteEdit or Delete MessageReport This Post
Member
Posted Hide Post
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')
 
Posts: 7 | Registered: April 01, 2008Reply With QuoteEdit or Delete MessageReport This Post
 Previous Topic | Next Topic powered by eve community  
 

IB - Developer Center    Forums  Hop To Forum Categories  iWay Products    VSAM to SQL Date Conversion using DataMigrator

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