View previous topic :: View next topic
|
Author |
Message |
jsnair
New User
Joined: 26 Sep 2006 Posts: 38 Location: India
|
|
|
|
Hello All,
I would like to have few clarifications about PS/flat file comparison.
1. Can we compare 2 PS/flat files against their columns. For example from the below sample files the values starting from column 12 to column 17 in File1 should compare against column 6 to column 12 in File2. Is this possible through any ISPF options or TSO commands.
File1:-
Code: |
****** ***************************** Top of Data ****************************
=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7
000001 1000 TOOL1 MFG100
000002 1500 TOOL2 MFG100
000003 7000 TOOL3 MFG100
000004 8000 TOOL4 MFG100 |
File2:-
Code: |
****** ***************************** Top of Data ******************************
=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
000001 1000 MFG100 TOOL1
000002 1500 MFG100 TOOL2
000003 7000 MFG100 TOOL3
000004 8000 MFG100 TOOL4 |
2. Can we insert new columns in an existing ps/flat file. |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
1. 3.13 - read the help
2. What do you mean by columns?
a. If you mean multiple positions holding various data elements, then this is not a flat file term - it is a database term.
b. If you mean column positions, then are you asking if you can add additional positions? If so, then that would be changing the LRECL - cannot do it.
c. If you mean put new data into the file - sure - just read a record, write whatever you want into it, then rewrite it.
I do not suppose my answer to your 2nd question is very useful. That is because the question is unclear. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
ispf utilities does not provide a way to compare different locations.
but, sort utilities can.
you could also write a REXX script (or use another programming language, or even sort) to rearrange one of the files so that the data is in similar columns,
then you could use SUPERC.
the answer to your second question is yes.
but to explain, would require much too much effort (and space in this thread)
to raise your skill set to that required to understand.
you should start by reading about fundamentals of z/os, datasets, and data in general. |
|
Back to top |
|
|
|