View previous topic :: View next topic
|
Author |
Message |
polymathtarun
New User
Joined: 01 May 2016 Posts: 10 Location: India
|
|
|
|
I have a problem statement. I am trying to dump decimal float fields (field not defined in COBOL but in C) from M/F to some other PS file but they are displaying as junk characters. The way these fields are stored in prduction VSAM files, they can be converted to date timestamp using a formula = (((A1/60)/60)/24)+DATE(1970,1,1)+(-5/24)
Code: |
START_DATETIME END_DATETIME
8/DFL 8/DFL
(116-123) (124-131)
18--------------------- 19---------------------
********************** TOP OF DATA **********************
0.000000000000000E+00 0.000000000000000E+00
1.459083508948937E+09 1.459083508960886E+09
1.459083509076715E+09 1.459083509571374E+09
1.459083608999276E+09 1.459083609005132E+09
1.459083609076200E+09 1.459083609288005E+09
1.459083767495601E+09 1.459083767497423E+09
1.459083961505914E+09 1.459083961507754E+09
1.459083972490339E+09 1.459083972996430E+09
1.459083973002954E+09 1.459083973047763E+09
1.459084043818478E+09 1.459084043855324E+09 |
Conversion sample below-
Code: |
Start_Datetime Start_Datetime after using above formula
1.458237600498944E+09 3/17/2016/13:00:00.499
1.458237600521761E+09 3/17/2016/13:00:00.522 |
Please let me know if anyone has ever written JCL for this conversion. |
|
Back to top |
|
 |
enrico-sorichetti
Senior Moderator

Joined: 14 Mar 2007 Posts: 10730 Location: italy
|
|
|
|
no...
because nobody with a bit of good judgement would use a float to represent a date! |
|
Back to top |
|
 |
Akatsukami
Global Moderator

Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
This was a really bad idea, not only because, as Dr. Sorichetti says, storing a date as a floating-point is itself a bad idea due to rounding issues, but because different platforms may store floating-point numbers differently.
I don't think that *Sort (and of course you're talking about *Sort, not JCL) can do this kind of calculation; you'll probably have to write a programette. |
|
Back to top |
|
 |
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
No - because JCL does not mess with data. It tells the system that you want to execute a program and what resources that program needs.
You shuld also present your data using the code tags. I will do that for you this time - and lock the topic. |
|
Back to top |
|
 |
|