View previous topic :: View next topic |
Author |
Message |
batu544 Beginner
Joined: 02 Aug 2005 Posts: 75 Topics: 27
|
Posted: Wed Oct 28, 2009 7:12 am Post subject: MASK in Easytrieve |
|
|
Hi All -
I am writing a easytrieve program to generate a report and in this program I need to use the SUMFILE. Everything is working fine; but whenever I am trying to put any MASK in the sumfile fields, I am getting error.
All the sumfile fields should be declared as 10 byte pack..
Code: |
FILE SFILE F ( 100 )
SFILE-IDCODE 1 3 P. * MASK ( A 'ZZZZZ' )
SFILE-MINE 4 3 P 0 MASK ( B 'Z9999' )
SFILE-TALLY 7 10 P 0 . *MASK ( B '???????9' )
SFILE-BPRICE 17 10 P 2 . *MASK ( BWZ ?????)
SFILE-QUADJ 27 10 P 2 .
SFILE-ESCADJ 37 10 P 2 .
SFILE-SO2ADJ 47 10 P 2 .
SFILE-ADDTAX 57 10 P 2 .
SFILE-INCSALE 67 10 P 2 .
SFILE-INCPURCH 77 10 P 2 .
SFILE-INFRGHT 87 10 P 2 .
|
Could anyone please let me know what should be the correct MASK for these fields ?
I tried all the possible combinations and for 9 P 2 type fields masking is working fine .. but not for 10 P 2.
Thanks
Prasanta _________________ Regards,
batu |
|
Back to top |
|
 |
papadi Supermod
Joined: 20 Oct 2009 Posts: 594 Topics: 1
|
Posted: Thu Oct 29, 2009 4:03 pm Post subject: |
|
|
Please post the cobol definition for the same file.
Which release of Easytrieve is being used? Which error if being generated?
If no mask is used for a "10 P 2" field, how is the output shown? _________________ All the best,
di |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Thu Oct 29, 2009 4:47 pm Post subject: |
|
|
papadi,
10 p 2 is equivalent to S9(17)V9(2) COMP-3 which is makes it a 10 byte 10 PD field
batu, try this (untested)
Code: |
----+----1----+----2
+9999999999999999.99 |
Kolusu |
|
Back to top |
|
 |
batu544 Beginner
Joined: 02 Aug 2005 Posts: 75 Topics: 27
|
Posted: Wed Nov 04, 2009 7:56 am Post subject: |
|
|
Hi Kolusu,
Thank you .. It worked !!! _________________ Regards,
batu |
|
Back to top |
|
 |
|
|