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

Compare particular columns in a file


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kumar_jalluri

New User


Joined: 02 Jun 2005
Posts: 24
Location: PUNE

PostPosted: Thu Jun 10, 2010 4:42 pm
Reply with quote

Hi,

Is there a way to compare particular columns in a file.

Example:

I want to compare
5 to 30 positions in file1 with 8 to 33 of file2 a nd
35 to 69 postions in file1 with 35 to 69 of file2.

Please give your suggestions...
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Thu Jun 10, 2010 4:46 pm
Reply with quote

Hi Kumar,

Your requirement is nt clear. What you want to do after comparing columns from different files? What is recformat & length of input file?what sort product available at your site?Please provide same input and output as well.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Jun 10, 2010 4:51 pm
Reply with quote

Because the solution for sort related questions may vary from product to product, please ensure that you state clearly which sort product you are using.

If you are not sure, then by running a simple sort step shown below, you will be able to find out for yourself.

If the messages start with ICE then your product is DFSORT and the topic will be moved to the DFSORT forum by one of the moderators. Please also post the output of the complete line which has a message code ICE201I, as this will enable our DFSORT experts to determine which release of DFSORT that you have installed. This may also affect the solution offered.

If the messages start with WER or SYT then the product is SYNCSORT and the topic will remain in the JCL forum. Please also post the information telling which version of SYNCSORT is installed, as this may also affect the solution offered.

Thank you for taking your time to ensure that the valuable time of others is not wasted by offering inappropriate solutions which are not relevant due to the sort product being used and/or the release that is installed in your site.

Code:
//SORTSTEP EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD *
ABC
//SORTOUT  DD SYSOUT=*
//SYSIN    DD *
  SORT     FIELDS=COPY
Back to top
View user's profile Send private message
kumar_jalluri

New User


Joined: 02 Jun 2005
Posts: 24
Location: PUNE

PostPosted: Thu Jun 10, 2010 6:34 pm
Reply with quote

Hi

All I want to do is... I made some code changes.. The expected result is

The fields 5 to 30 positions in file1 with 8 to 33 of file2 should be same.

similarly 35 to 69 postions in file1 with 35 to 69 of file2. should be same.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Jun 10, 2010 6:39 pm
Reply with quote

You just repeated the info given in the starting question!

in order to get help You need to answer the questions You are asked !
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Jun 10, 2010 6:41 pm
Reply with quote

Yes, and Gupta has asked some questions which makes him think that a reasonably easy solution using your sort product maybe available.

I asked the questions to make sure that everyone who reads this thread will see the information that you have provided and if they have a possible solution to know which facilities of the sort product are applicable because we know the sort product and release level.

We do not ask questions for the sake of getting you to go away and do something, but merely to acquire enough information, which you did not supply in your original post, to be able to help you.

So, if you want our help - please answer the questions that have been asked.
Back to top
View user's profile Send private message
Ronald Burr

Active User


Joined: 22 Oct 2009
Posts: 293
Location: U.S.A.

PostPosted: Thu Jun 10, 2010 7:52 pm
Reply with quote

SUPERCE ( ISPF Option 3.13 ) will do what has been requested, if a SORT solution is not required.
See The Manual
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


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

PostPosted: Fri Jun 11, 2010 5:15 pm
Reply with quote

I was wondering if someone was going to suggest 3,13.

If you haven't used 3.13 before, note that it has a batch mode, which generates JCL you can save for later use.

It also has the parms for specifiying columns.

I suggest testing on small files first if your actual files are big.
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 496
Location: USA

PostPosted: Tue Jun 15, 2010 9:25 pm
Reply with quote

Helo Kumar.

SyncSort's JOIN facility can do what you have asked, but you need to specify what you want in the output. Do you want matched records, unmatched records from File1, unmatched records from File2? Please give more details regarding your desired output and we would be happy to further assist you. (Showing sample input and output records is helpful).

Regards,
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 4
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
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top