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: 3048
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

Senior Member


Joined: 29 Apr 2008
Posts: 2010
Location: USA

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 Member


Joined: 01 Sep 2015
Posts: 712
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 Member


Joined: 01 Sep 2015
Posts: 712
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

Senior Member


Joined: 29 Apr 2008
Posts: 2010
Location: USA

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 Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
Search our Forums:

Back to Top