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

How to find which file contains my searched data


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
soumyabiswas

New User


Joined: 05 Nov 2020
Posts: 2
Location: India

PostPosted: Thu Nov 05, 2020 6:24 pm
Reply with quote

Hi - I am using sort utility to search one record in a set of 10 files. Only one file will contain the expected data. when i am giving all the 10 input at sortin, i m getting result in sortout file. But i need to know which file out of 10 files contains the actual data..is there any way to get that apart from running sort with individual file?

Thanks in advance.

Soumya
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 2632
Location: NYC,USA

PostPosted: Thu Nov 05, 2020 10:16 pm
Reply with quote

Write a Program. Thru Rexx you can get the name of the Data Set allocated on each DD and then do a look up and if found then write DSN name and record in out.
Second option , if you have a unique header then copy that in output and link back later to DSN.
Third, Check CBTtapes website if they offer anything.
Back to top
View user's profile Send private message
sergeyken
Warnings : 2

Senior Member


Joined: 29 Apr 2008
Posts: 1009

PostPosted: Fri Nov 06, 2020 6:18 am
Reply with quote

This question has nothing to do neither with JCL, nor with VSAM.

AFAIR the SuperSearch utility can recognize, and log the number of DD in concatenation where the string has been found.

This problem is so trivial, I’m just lazy to run the test, or to re-check the manuals. Please do it (at least this only) by yourself.
Back to top
View user's profile Send private message
Willy Jensen

Active User


Joined: 01 Sep 2015
Posts: 443
Location: Denmark

PostPosted: Fri Nov 06, 2020 2:41 pm
Reply with quote

run 10 steps icon_smile.gif
Back to top
View user's profile Send private message
Willy Jensen

Active User


Joined: 01 Sep 2015
Posts: 443
Location: Denmark

PostPosted: Fri Nov 06, 2020 3:00 pm
Reply with quote

Sorry I did not read your entry thoroughly.
Actually doing 10 separate sorts is not such a big deal, you can do it as an in-stream procedure like shown below, especially since you have your sort step already:

//A PROC IDS=
//S EXEC SORT
//SORTIN DD DISP=SHR,DSN=&IDS
..rest of SORT JCL ..
// PEND
//*
//S1 EXEC A,IDS=1st.dataset

I seem to recall that you can have instream data in a procedure now, but if not then put the sort sysin in a dataset.

If this is something which is to run regularly then SuperSearch as sergeyken suggests is probably the way to go.
Back to top
View user's profile Send private message
sergeyken
Warnings : 2

Senior Member


Joined: 29 Apr 2008
Posts: 1009

PostPosted: Fri Nov 06, 2020 6:36 pm
Reply with quote

FYI:
Unlike DFSORT, the SYNCSORT utility can support the option MULTIIN. It would allow you to get the number of the input file when the string is found.
Back to top
View user's profile Send private message
soumyabiswas

New User


Joined: 05 Nov 2020
Posts: 2
Location: India

PostPosted: Sun Nov 08, 2020 9:22 pm
Reply with quote

Thanks all for your help.
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Get two files from one file with diff... DFSORT/ICETOOL 10
No new posts View GDG data which is copied from a ... JCL & VSAM 2
No new posts How to read unpacked field created in... DFSORT/ICETOOL 11
No new posts JCL (SET) variables in input stream data JCL & VSAM 0
No new posts How to add 2 digits to COMP-3 file? DFSORT/ICETOOL 11
Search our Forums:

Back to Top