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

PS/flat file comparison


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jsnair

New User


Joined: 26 Sep 2006
Posts: 38
Location: India

PostPosted: Tue Oct 26, 2010 4:54 pm
Reply with quote

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
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Tue Oct 26, 2010 5:18 pm
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Oct 26, 2010 5:24 pm
Reply with quote

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
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 -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 2
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