Hi there!
I'm trying to insert a number 100.00 S9(13)V9(2) comp-3n in a txt file.
I have the record:
01 RECORD.
03 REC-TYPE PIC S9(2).
03 REC-TYPE10.
05 FILI PIC X(5).
05 CON PIC X(12).
03 REC-TYPE20 REDEFINES REC-TYPE10
05 CAUS PIC X(5).
05 IMP PIC S9(13)V9(2) COMP-3.
05 FILLER PIC (4).
When I make a physical .txt file on a hard disk, (to open it and read it), just to work with some examples, how do I need to write down the comp-3 value?
If CAUS has the value A (4blanks), IMP has the value 100,00, and filler are 4 spaces. In any way that I tried compiling it, I receive for imp the values like +303030303....
Thanks.
comp-3 in a txt file
-
- Posts: 7
- Joined: Sat Feb 16, 2008 10:26 pm
- Skillset: Beginner
- Referer: Internet
-
- Posts: 110
- Joined: Thu Dec 27, 2007 5:18 pm
- Skillset: Known little stuffs to answer a few queries!!
- Referer: Google
- Contact:
Re: comp-3 in a txt file
If you want the variable IMP to be in a readable format use editted variables. Refer this.
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/igy3lr10/5.3.11.9.1?ACTION=MATCHES&REQUEST=ZZ&TYPE=FUZZY&SHELF=&DT=20020920180651&CASE=&searchTopic=TOPIC&searchText=TEXT&searchIndex=INDEX&rank=RANK&ScrollTOP=FIRSTHIT#FIRSTHIT
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/igy3lr10/5.3.11.9.1?ACTION=MATCHES&REQUEST=ZZ&TYPE=FUZZY&SHELF=&DT=20020920180651&CASE=&searchTopic=TOPIC&searchText=TEXT&searchIndex=INDEX&rank=RANK&ScrollTOP=FIRSTHIT#FIRSTHIT
Re: comp-3 in a txt file
Huh? What platform are you trying to do this on?veronikaluv wrote:in a txt file.
- dick scherrer
- Global moderator
- Posts: 6268
- Joined: Sat Jun 09, 2007 8:58 am
Re: comp-3 in a txt file
Hello,
You can create a text file or you can create a file with packed-decimal data, but they will not be the same file.
If you explain the requirement, we can probably offer suggestions on how to proceed.
COMP-3 (packed-decimal) is not valid in a "text file".I'm trying to insert a number 100.00 S9(13)V9(2) comp-3n in a txt file.
You can create a text file or you can create a file with packed-decimal data, but they will not be the same file.
If you explain the requirement, we can probably offer suggestions on how to proceed.
Hope this helps,
d.sch.
d.sch.
Re: comp-3 in a txt file
If just trying to get IMP equal to 100.00:
MOVE 100.00 TO IMP.
05 IMP PIC S9(13)V9(2) COMP-3 VALUE 100.00.
MOVE 100.00 TO IMP.
05 IMP PIC S9(13)V9(2) COMP-3 VALUE 100.00.
Re: comp-3 in a txt file
BTW, that looks like a hex display of unpacked ASCII zeros......values like +303030303....
-
- Similar Topics
- Replies
- Views
- Last post
-
- 3
- 5915
-
by sergeyken
View the latest post
Sat Dec 10, 2022 2:30 am
-
- 5
- 2774
-
by sergeyken
View the latest post
Thu Feb 25, 2021 8:19 pm
-
-
Moving High-Values from Comp-3 - COBOL Ver 6.4
by girik1001 » Thu Jul 20, 2023 12:08 pm » in IBM Cobol - 1
- 3945
-
by sergeyken
View the latest post
Thu Jul 20, 2023 6:38 pm
-
-
- 1
- 1815
-
by sergeyken
View the latest post
Fri Mar 26, 2021 11:59 pm
-
-
EZIOE004 Logical I/O error on file occurred reading VB file
by savitha_y » Mon Feb 15, 2021 7:54 pm » in CA-Easytrieve - 3
- 4976
-
by savitha_y
View the latest post
Wed Feb 17, 2021 5:02 am
-