View previous topic :: View next topic
|
Author |
Message |
poonam_madaan
New User
Joined: 01 Dec 2006 Posts: 3 Location: Bangalore
|
|
|
|
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 |
|
|
MFRASHEED
Active User
Joined: 14 Jun 2005 Posts: 186 Location: USA
|
|
|
|
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 |
|
|
poonam_madaan
New User
Joined: 01 Dec 2006 Posts: 3 Location: Bangalore
|
|
|
|
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 |
|
|
MFRASHEED
Active User
Joined: 14 Jun 2005 Posts: 186 Location: USA
|
|
|
|
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 |
|
|
|