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
 
Compare particular columns in a file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Compare particular columns in a file
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: 1187
Location: Bangalore,India

PostPosted: Thu Jun 10, 2010 4:46 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Thu Jun 10, 2010 4:51 pm    Post subject:
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10326
Location: italy

PostPosted: Thu Jun 10, 2010 6:39 pm    Post subject: Reply to: Compare files
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: 8593
Location: Back in jolly old England

PostPosted: Thu Jun 10, 2010 6:41 pm    Post subject:
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    Post subject:
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

Active Member


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

PostPosted: Fri Jun 11, 2010 5:15 pm    Post subject:
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: 500
Location: USA

PostPosted: Tue Jun 15, 2010 9:25 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
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
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm

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