Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Can I compare the value of two fields of a file?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Compuware & Other Tools
View previous topic :: :: View next topic  
Author Message
poonam_madaan

New User


Joined: 01 Dec 2006
Posts: 3
Location: Bangalore

PostPosted: Fri Dec 01, 2006 2:03 pm    Post subject: Can I compare the value of two fields of a file?
Reply with quote

Can I compare the value of two fields of a file using file-aid?
For ex:
COL1=COL2 or 10:5 = 20: 5 (this is just an example where col1 is on position 10 and col2 in on position 20)
Back to top
View user's profile Send private message

MFRASHEED

Active User


Joined: 14 Jun 2005
Posts: 186
Location: USA

PostPosted: Fri Dec 01, 2006 11:26 pm    Post subject: Re: Can I compare the value of two fields of a file?
Reply with quote

Yes you can, on compare screen specify column offset , length and type:

Code:

File-AID ----------- Compare - Unformatted Criteria ---------------------
COMMAND ===>                                                 SCROLL ===>
      OLD                   NEW                                         
 Cmd  Pos.    Length Type   Pos.    Length Type   Status Display         
                                                                         
  _   1       133     C     1       133     C     COMPARISON FIELD       
  _   _____   _____   __    _____   _____   __                           
  _   _____   _____   __    _____   _____   __                           
  _   _____   _____   __    _____   _____   __                           
  _   _____   _____   __    _____   _____   __                           
  _   _____   _____   __    _____   _____   __                           
  _   _____   _____   __    _____   _____   __                           
  _   _____   _____   __    _____   _____   __                           
  _   _____   _____   __    _____   _____   __                           
  _   _____   _____   __    _____   _____   __                           
  _   _____   _____   __    _____   _____   __                           
  _   _____   _____   __    _____   _____   __                           
  _   _____   _____   __    _____   _____   __                           
  _   _____   _____   __    _____   _____   __                           
  _   _____   _____   __    _____   _____   __                           
  _   _____   _____   __    _____   _____   __                           
  _   _____   _____   __    _____   _____   __                           
  _   _____   _____   __    _____   _____   __                           
Cmd: S = Sync/Key, T = Tolerance, C = Compare, R = Reset       
         
Back to top
View user's profile Send private message
poonam_madaan

New User


Joined: 01 Dec 2006
Posts: 3
Location: Bangalore

PostPosted: Mon Dec 04, 2006 10:12 am    Post subject: Re: Can I compare the value of two fields of a file?
Reply with quote

Thanks MFRASHEED for the reply..
But How do I reach this screen. I'm giving option v;f;10..
but when I give the same name for Old and New file, it gives me error.
I'm using Compare Mode as U and selection usage criteria as T. It doesnt give me this screen. On the next screen I chose option 3 and it gives me the following screen:
AND
Cmd /OR Position Length RO Data Value
--- --- -------- ------ -- ----------------------------------------------------
___ _____ _____ EQ ____________________________________________________
___ AND _____ _____ EQ ____________________________________________________
___ AND _____ _____ EQ ____________________________________________________
___ AND _____ _____ EQ ____________________________________________________
___ AND _____ _____ EQ ____________________________________________________
___ AND _____ _____ EQ ____________________________________________________
___ AND _____ _____ EQ ____________________________________________________
___ AND _____ _____ EQ ____________________________________________________
___ AND _____ _____ EQ ____________________________________________________
___ AND _____ _____ EQ ____________________________________________________
___ AND _____ _____ EQ ____________________________________________________
___ AND _____ _____ EQ ____________________________________________________
___ AND _____ _____ EQ ____________________________________________________
___ AND _____ _____ EQ ____________________________________________________
Back to top
View user's profile Send private message
MFRASHEED

Active User


Joined: 14 Jun 2005
Posts: 186
Location: USA

PostPosted: Tue Dec 05, 2006 4:23 am    Post subject: Re: Can I compare the value of two fields of a file?
Reply with quote

If fields are in same file, just make copy of the file and use one as OLD and other as NEW.

You would use Selection criteria only if you want filter out records before compare, otherwise use 'N'.

Next screen will be 'Compare - Execution Options', choose online if file is small.

Next screen will be
Code:

 File-AID ----------------- Compare - Criteria Options -------------------------
 COMMAND ===>                                                                   
                                                                               
 Specify Initial Compare Options:                                               
                                                                               
  Compare type            ===> S   (S = Sorted/Keyed; R = ReadAhead; 1 = 1-to-1)
                                                                               
  Read-ahead record count ===>     (If type = R, specify read-ahead count)     
  Read-ahead sequence     ===> I   (E= Enforce; I = Ignore)                     
                                                                               
  Records to compare      ===> ALL (All or maximum number of records)           
  Differences to compare  ===> ALL (All or maximum number of differences)       
                                                                               
  Modify print defaults   ===> N   (Y = Yes; N = No)                           
  Specify output criteria ===> N   (Y = Yes; N = No)                           


and final screen will be 'Compare - Unformatted Criteria' as given earlier.
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 -> Compuware & Other Tools All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Subtract the ZD fields to provide neg... Balaryan DFSORT/ICETOOL 4 Wed Oct 11, 2017 10:51 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us