View previous topic :: View next topic |
Author |
Message |
yadav2005 Intermediate

Joined: 10 Jan 2005 Posts: 348 Topics: 144
|
Posted: Thu Jun 18, 2009 11:15 am Post subject: unable to interpret date of comp-3 format in File Aid |
|
|
I have a dataset which has a record layout in the copybook and the field which I am looking for is like below:
Code: |
10 PAIDTO-DATE COMP-3.
15 PAIDTO-YEAR PIC S9(05).
15 PAIDTO-DAY PIC S9(03).
|
In File Aid I am seeing the value as below:
Code: |
10 PAIDTO-DATE 5/GRP
15 PAIDTO-YEAR 3/PS X'009C11'
15 PAIDTO-DAY 2/PS X'4C02'
|
First of all I want to know what is the value for Year (Bytes of comp-3 data) and Day (2 bytes of comp-3 data ) as the data in comp-3 format. I want to update the date something like below:
Code: |
2010 should be year
01 should be the month
02 should be the date.
10002 i guess it should be 10 for year and 002 for the day of the year
|
I think the date is in julian format and they have used comp-3 for date , year seperately and day seperately.Can anybody help me in this regard. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Thu Jun 18, 2009 6:46 pm Post subject: |
|
|
yadav2005,
Code: |
PIC S9(05) comp-3 = 3 bytes which can store X'00000S' ( s can be C/F for + and D for - )
PIC S9(03) comp-3 = 2 bytes which can store X'000S' ( s can be C/F for + and D for - )
|
but none of the values you show end with a valid sign. So I am guessing that you mapped the file lay out wrong. Check if the input is VB file and make sure you account for the RDW in the copy book _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
yadav2005 Intermediate

Joined: 10 Jan 2005 Posts: 348 Topics: 144
|
Posted: Fri Jun 19, 2009 10:45 am Post subject: |
|
|
Thank you Kolusu for the good explanation. I was able to know my mistake. |
|
Back to top |
|
 |
|
|