Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to write a masked variable to a file using Easytrieve.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
View previous topic :: :: View next topic  
Author Message
santhoshm

New User


Joined: 13 Jun 2007
Posts: 32
Location: chennai

PostPosted: Wed Oct 31, 2012 4:39 pm    Post subject: How to write a masked variable to a file using Easytrieve.
Reply with quote

Hi,

I need to compare two files of same record layout, and write the difference to a third file.

We are using a field(var1) as key to compare (IF MATCHED).
Each record has a field(var2) which is eg. “$123.45” cobol declaration is $(9).9(2)

This field(var2) in both the files has to be compared and if different then written to an output file.

Second time when the kay (var1) matches again we compare the field(var2) and if different then written to an output file.

Every time we write record to output file the field(var2) has to be summed. i.e. var3 = var3 + var2

My question is how to convert the $123.45 to 00000012345, for computing ?

And how to write a masked variable to output file in easytrieve? E.g. 00000012345 to $123.45 and write to a file in easytrieve. It should display as $123.45 in the file.
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7253

PostPosted: Wed Oct 31, 2012 4:55 pm    Post subject: Reply to: How to write a masked variable to a file using Eas
Reply with quote

Both of these things have been covered before if you look through/search the Easytrieve topics here.

The second part (as CA provide some code for the first part, I believe you'll discover, look for a posting by Jose) is more tricky for you. The easiest way is to write a Cobol file exit for a "dummy" PRINTER FILE. Otherwise, go without it edited (why does it need to be edited?) or do the editing "manually" with some code.

EDIT:

An example PRINTER EXIT is now here.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us