View previous topic :: View next topic
|
Author |
Message |
kiranbhargava18
New User
Joined: 21 Apr 2009 Posts: 10 Location: Hyderabad
|
|
|
|
I am trying to mask a field in Easytrieve and write the field to an output file. The field is not getting masked and is appearing as same in the input file. But, while I am displaying the field, the mask is visible in the sysout.
Please let me know where I am going wrong and also if we can mask the characters and write them to a File (not report) |
|
Back to top |
|
|
alan_blore
New User
Joined: 01 Aug 2007 Posts: 50 Location: Hosur
|
|
|
|
Hi Kiran,
It will be better if you post the Code where you do the exact operation along with their data defintion.
One thing you can do while masking for easytrieve is:
1. Say you define the field in File - like
Code: |
OUT-PRC 28 5 N MASK '----9'
|
2. You need to display temp variables where the temp movement will be done before final move like
Code: |
*
WS-COST W 7 N 2 MASK ('ZZZZZ.ZZ')
WS-COST-A WS-COST 7 A
WS-COST-EDIT W 7 N 2 MASK('ZZZZZ.ZZ')
WS-COST-EM WS-COST-EDIT 5 A
WS-COST-ED WS-COST-EDIT +5 2 A
WS-COST-FMT W 8 A
WS-COST-M WS-COST-FMT 5 A
WS-COST-P WS-COST-FMT +5 1 A VALUE '.'
WS-COST-D WS-COST-FMT +6 2 A
*
|
3. Then in the program you can have the code like:
Code: |
WS-COST = WS-PRC
WS-COST-EDIT = WS-COST
WS-COST-M = WS-COST-EM
WS-COST-D = WS-COST-ED
OUT-PRC = WS-COST-FMT
|
This is more similar to the COBOL logic we have for Display variables - 9(9).99
Thanks
alan
B'lore |
|
Back to top |
|
|
kiranbhargava18
New User
Joined: 21 Apr 2009 Posts: 10 Location: Hyderabad
|
|
|
|
Hi Alan,
This is what I am exactly trying to do but it is not working.
When I display the variable (be it Working storage or be it the output file variables) I can see the masked value in the SYSOUT, but, when I write the same to the file, the masked value does not appear.
Thanks for the reply. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
For many releases, Easytrieve wrote masked values to reports but not files. . .
I don't have the current release available, so i can't run any tests.
If your attempt at using the posted example is not working, suggest you post your variables and procedural code and maybe we can see what is causing the problem. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
An example PRINTER EXIT is now here.
This will allow you to use a MASK to edit a field, and then put that field on an output file. |
|
Back to top |
|
|
|