View previous topic :: View next topic
|
Author |
Message |
ddyuva
New User
Joined: 06 Sep 2012 Posts: 1 Location: india
|
|
|
|
Hi ,
This is my file which contains the dates in comp-3 format.
CI.M204QAV3.CIFS420.DATA
Here is the copybok of the FIle
*
01 CIFS420-RECORD.
03 C420-TRADING-DATE PIC S9(9) COMP-3.
03 C420-LOGICAL-DATE PIC S9(9) COMP-3.
*
Please let me know on how I can transfer the entire comp-3 file into a file containing numeric data?
Thanks in advance.
Dinesh |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
1. A file is not COMP-3, only individual variables can be COMP-3.
2. COMP-3 is numeric -- you need to spend a LOT of time reading the COBOL Language Reference manual (link at the top of this page) to understand this.
3. If you want to convert the COMP-3 fields in your file to DISPLAY fields, you can use your site's SORT product to do this, or you can write a simple COBOL program that copies the file, with the same FD for both files (just change the 01 name), except the output file does not have COMP-3 on the variables. Read a record, move it to the output file FD, write it, repeat until end of file ... not a hard task. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Are you talking about an FTP transfer? If so, all COMP-3 (Packed-Decimal) fields need to be converted into Display-Numeric beforehand.
Unless you have negative-dates, the Display-Numeric fields can be unsigned. |
|
Back to top |
|
|
|