IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

FileAid to compare(logical operations) 2 fields in one file


IBM Mainframe Forums -> Compuware & Other Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
anand1204

New User


Joined: 16 Jan 2015
Posts: 12
Location: USA

PostPosted: Wed Apr 06, 2016 2:55 am
Reply with quote

Hi,

I have a file & it has date fields in 2 different places (say 1st date filed in 10th Position & 2nd date field in 20th position).
Now i need to compare the dates and write into another file if 10th position date is greater than 20th position date. Can you please help me out??

e.g

Code:
----+----1----+----2----+----3---
         20150102  20150101
         20150102  20150102   <===
         20150103  20150102     
         20150201  20150102     


Now my output file should have only



Code:
----+----1----+----2----+----3---
         20150102  20150101     
         20150103  20150102     
         20150201  20150102     


Thanks,
Anand
[coded]
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Wed Apr 06, 2016 4:49 pm
Reply with quote

please use the code tags to present code, data, screenshots and anything else requiring retention of spaces. Did you not notice that your data display did not match your words?

Coded for you this time - but maybe not next time.

With code tags:
Code:
----+----1----+----2----+----3---
         20150102  20150101
         20150102  20150102   <===
         20150103  20150102     
         20150201  20150102     


Without code tags:
----+----1----+----2----+----3---
20150102 20150101
20150102 20150102 <===
20150103 20150102
20150201 20150102
Back to top
View user's profile Send private message
anand1204

New User


Joined: 16 Jan 2015
Posts: 12
Location: USA

PostPosted: Thu Apr 07, 2016 3:58 am
Reply with quote

Thanks Nic, I didnt realize it will not retain spaces.

Nic Clouston wrote:
please use the code tags to present code, data, screenshots and anything else requiring retention of spaces. Did you not notice that your data display did not match your words?

Coded for you this time - but maybe not next time.

With code tags:
Code:
----+----1----+----2----+----3---
         20150102  20150101
         20150102  20150102   <===
         20150103  20150102     
         20150201  20150102     


Without code tags:
----+----1----+----2----+----3---
20150102 20150101
20150102 20150102 <===
20150103 20150102
20150201 20150102
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Thu Apr 07, 2016 3:19 pm
Reply with quote

Quote:
I didnt realize it will not retain spaces.


You mean you did not check your post after submitting it? Bad, very bad - not just in a forum but in your work in general.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Compuware & Other Tools

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top