Translating SPL to Java
Posted in 2000
Topics: Stored Procedures & SPL, Connectivity: ODBC / JDBC / .NET, Data Types & Schema Design, Java & JDBC Development
I am in the process of translating some SPL routines into Java. I am curious how others approached solving the following types of issues: * In SPL you are able to do DATE math similiar to the following: IF (((pMer_EndDate - pMer_StartDate)::INTERVAL DAY TO DAY)::VARCHAR(3))::INTEGER > 0 THEN ... Any thoughts on doing DATE math in java? * In SPL, you are able to casts similiar to the following: LET pStrTotal = pHrs ||":"|| pMin ||":"|| pSec; LET pPrv_Total = pStrTotal::INTERVAL Hour(4) to Second; Any thoughts on the Java equivalent. Environment: java version "1.2.2" Classic VM (build JDK-1.2.2_006, native threads, symcjit) Informix JDBC Driver Version 2.11.JC2 iif.2000 v9.21.tc1 TIA Steve Romankiw
Steve Romankiw1 wrote in message <8vm0ls$que$1@news.xmission.com>... > >I am in the process of translating some SPL routines into Java. I am >curious how others approached solving the following types of issues: > > Any thoughts on doing DATE math in java? > > LET pPrv_Total = pStrTotal::INTERVAL Hour(4) to Second; > > Any thoughts on the Java equivalent. Have you considered implementing a class to mimic the behaviour of the various Informix datatypes? Maybe there are some standard classes available out there???