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
 
fuzzy compare

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Martylin

New User


Joined: 08 Mar 2016
Posts: 7
Location: Taiwan

PostPosted: Thu Mar 30, 2017 2:45 pm    Post subject: fuzzy compare
Reply with quote

Is there any kind of function for fuzzy compare in JCL ?

for example: the dataset look like :
a0001 111111AAAA111111
a0002 111AAAA111111111
a0003 11111111111111111
a0004 111111111AAAA111

"AAAA" is the string that I want to search! but the position is not fixed
output will be 1,2,4 rows

thanks!
Back to top
View user's profile Send private message

prino

Senior Member


Joined: 07 Feb 2009
Posts: 1067
Location: Oostende, Belgium

PostPosted: Thu Mar 30, 2017 3:39 pm    Post subject:
Reply with quote

JCL cannot even do unfuzzy compares, other tahn to check returncodes from (a) previous step(s).

You need to use SuperC.
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 585
Location: The Universe

PostPosted: Thu Mar 30, 2017 3:50 pm    Post subject:
Reply with quote

NO!

JCL has no ability to analyze or alter data. Period. Full stop. End of story. The sole purpose of JCL is to specify the environment in which batch programs programs run.

Now, are there any programs to perform a "fuzzy" find as you describe? One problem is there are many definitions of a "fuzzy" find. The example in the extended query, for example, can easily be written into a program, but it is so limited I rather doubt anyone wrote such a program.

JCL like this will perform the task you propose.
Code:
//A       EXEC PGM=IKJEFT01
//SYSTSPRT DD  SYSOUT=*
//SYSTSIN  DD  *
e 'your data set' data nonum
v
f * 999999 /aaa/ ALL
end


This JCL runs a program: IKJEFT01, the TSO terminal monitor program, to run a TSO command (another program) to find (another program) all occurrences of the aaa string in the data set.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7314

PostPosted: Thu Mar 30, 2017 4:23 pm    Post subject: Reply to: fuzzy compare
Reply with quote

You probably mean your SORT product.

Code:
 INCLUDE COND=(startofwheretosearch,endofwheretosearch,SS,C'AAAA')
Back to top
View user's profile Send private message
sergeyken

Active User


Joined: 29 Apr 2008
Posts: 212
Location: Maryland

PostPosted: Thu Mar 30, 2017 5:29 pm    Post subject: Re: Reply to: fuzzy compare
Reply with quote

Bill Woodger wrote:
You probably mean your SORT product.

Code:
 INCLUDE COND=(startofwheretosearch,endofwheretosearch,SS,C'AAAA')

Code:
 INCLUDE COND=(startofwheretosearch,endofwheretosearch,SS,EQ,C'AAAA')
Back to top
View user's profile Send private message
sergeyken

Active User


Joined: 29 Apr 2008
Posts: 212
Location: Maryland

PostPosted: Thu Mar 30, 2017 5:33 pm    Post subject:
Reply with quote

AFAIR the topic starters who are not able to understand the difference between JCL, and Utility Program, some time earlier they had been sent to the beginners forum, isn't it?
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10352
Location: italy

PostPosted: Thu Mar 30, 2017 6:16 pm    Post subject: Reply to: fuzzy compare
Reply with quote

sadly over the majority of mainframe related forums
anything that is not a user written program is considered JCL

no corrections, flaming, ... , .....
have had any influence in changing the belief
Back to top
View user's profile Send private message
sergeyken

Active User


Joined: 29 Apr 2008
Posts: 212
Location: Maryland

PostPosted: Thu Mar 30, 2017 8:46 pm    Post subject: Re: Reply to: fuzzy compare
Reply with quote

enrico-sorichetti wrote:
sadly over the majority of mainframe related forums
anything that is not a user written program is considered JCL

no corrections, flaming, ... , .....
have had any influence in changing the belief

Hum-m-m...
And mainframe is just a huge iPhone, isn't it?
Back to top
View user's profile Send private message
Martylin

New User


Joined: 08 Mar 2016
Posts: 7
Location: Taiwan

PostPosted: Fri Mar 31, 2017 6:59 am    Post subject:
Reply with quote

thanks to everyone
the answer is no haha, so I made a PLI program GFUZZY to do fuzzy search!

JCL
Code:

//GFUZZY  EXEC PGM=GFUZZY                           
//SYSPRINT DD SYSOUT=*                             
//INPUTFI  DD DSN=DATA.L024A01.PS,DISP=SHR         
//OUTPUTO  DD DSN=DATA.L024A02.PS,DISP=OLD         
//CARDINI  DD *                                     
00024,10,AA12345678                                 
/*                                                 
//*  1-5  LL=5  INPUT FILE LENGTH                   
//*  6-7  LL=2  FUZZY STRING LENGTH (MAX 60)       
//*  ??   FUZZY STRING (MAX 60 CHAR)               



PLI like this:

Code:

GWK_IDX = INDEX(GWK_INPUTF,GWK_SRCH_STR);
                                         
IF GWK_IDX ^= 0 THEN                     
   WRITE FILE (OUTPUTO) FROM (GWK_INPUTF);
/* END IF */   
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1067
Location: Oostende, Belgium

PostPosted: Fri Mar 31, 2017 3:48 pm    Post subject:
Reply with quote

Martylin wrote:
thanks to everyone
the answer is no haha, so I made a PLI program GFUZZY to do fuzzy search!

And no doubt this resulted in the client being charged for some hobbyist piece of crapware.

Don't you flipping know that IBM provides a program called ISRSUPC, more commonly knows as SuperC that does exactly what you want, and rather a lot more efficiently!

Stupid boy!
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 Compare and COPY using DFSORT pshongal DFSORT/ICETOOL 3 Fri Nov 17, 2017 9:49 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
No new posts compare 2 rows within the same file ram_vizag SYNCSORT 7 Wed Jun 14, 2017 12:34 am
No new posts member list compare jzhardy TSO/ISPF 6 Fri May 12, 2017 3:18 pm

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