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

Listing Matching Records using 3.13 SUPER CE


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

New User


Joined: 21 Oct 2011
Posts: 9
Location: India

PostPosted: Thu Nov 03, 2011 4:27 am
Reply with quote

Hi All,
Is it possible to display the Matching Records (instead of the Differences) using 3.13 SUPER CE utility. If so, please let me know how. Thank you.


Regards,
Nageshwar
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Nov 03, 2011 10:22 am
Reply with quote

Hello and welcome to the forum,

Not that i'm aware of - SUPERC is to identify differences. . .

You can probably do what you want using your sort product.

For any help to be given, you need to post much more info than you have. What re the recfm and lrecl of the files? What is wanted for output? Post some representative sample input data from both files and show the output you want when your process is run.

Which sort product is used on your system?
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Thu Nov 03, 2011 11:13 am
Reply with quote

Hi,

like Dick, I'm not aware how to get matched records only.

This is the closest output I can generate using ISRSUPC in batch which shows both matches and mismatches.


Code:
//SUPERC   EXEC PGM=ISRSUPC,                   
//         PARM=(LINECMP,UPDLDEL)               
//DELDD    DD SYSOUT=*                         
//OUTDD    DD SYSOUT=*                         
//NEWDD    DD *                                 
001                                             
002                                             
003                                             
004                                             
005                                             
006                                             
007                                             
008                                             
009                                             
010   
011                                         
//OLDDD    DD *                                 
001                                             
002                                             
004                                             
005                                             
006                                           
007                                           
009                                           
010   
012                                       
//SYSIN    DD *                               
 CMPCOLM 001:080                               
/*


It will require some massaging of the output so Dick's suggestion of using SORT is a better option.


Gerry
Back to top
View user's profile Send private message
Nageshwar Vedula

New User


Joined: 21 Oct 2011
Posts: 9
Location: India

PostPosted: Thu Nov 03, 2011 11:45 am
Reply with quote

Thank you Dick and Gerry. I will try both the suggested options. Thank you.
Back to top
View user's profile Send private message
Nageshwar Vedula

New User


Joined: 21 Oct 2011
Posts: 9
Location: India

PostPosted: Thu Nov 03, 2011 7:24 pm
Reply with quote

Hi Gerry,
I used your example and I got Matching, Un-Matching records all in one. Now I want to separate Matching from Unmatching. For that below is the requirement.

If the First 2 Bytes of the Record is *M, then start copying all the Records till the Record whose first 2 bytes are *I or *D. for eg.

*M- MAT#= 4
BKCAMT02
BKCAMT03
BKCAMT04
BKCAMT05
*I- INS#= 21
CSVST000
*M- MAT#= 1
CSVST001
*I- INS#= 1
CSVVF01
*M- MAT#= 1
CSVVW01
*D-RP DEL#= 2
CS12345
CS56789

So my output should contain all the records from *M till (*I or *D) in the above i.e. This should be repeated for all *M in the First 2 bytes

So the o/p file will contain all the Matching Records as below.

BKCAMT02
BKCAMT03
BKCAMT04
BKCAMT05
CSVST001
CSVVW01


Please help. Thank you.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Thu Nov 03, 2011 7:44 pm
Reply with quote

Nageshwar Vedula wrote:
Hi Gerry,
I used your example and I got Matching, Un-Matching records all in one. Now I want to separate Matching from Unmatching. For that below is the requirement.

If the First 2 Bytes of the Record is *M, then start copying all the Records till the Record whose first 2 bytes are *I or *D. for eg.[...]So my output should contain all the records from *M till (*I or *D) in the above i.e. This should be repeated for all *M in the First 2 bytes

Ah, so now we see a rather different requirement; you want your output to consist of groups of records identified by group headers.

Not being a *Sort maven, I will defer to those more knowledgeable than I as to whether this can be done with *Sort. Otherwise, you're looking at a little programming; fortunately, as your profile indicates that COBOL is in your skill set, this will not be difficult for you.
Back to top
View user's profile Send private message
Nageshwar Vedula

New User


Joined: 21 Oct 2011
Posts: 9
Location: India

PostPosted: Thu Nov 03, 2011 7:54 pm
Reply with quote

Shall I post this Question in DFSORT section to chk if its possible with DFSORT
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Thu Nov 03, 2011 8:07 pm
Reply with quote

I would recommend against it; the duplicate post would only be seen as a waste of space and an annoyance. One of the moderators -- Mr. Yaeger, if no other -- will know if it is possible or not. If so, you can ask (or perhaps will not even need to do so) that moderator to move this thread to a more appropriate forum.
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Thu Nov 03, 2011 8:12 pm
Reply with quote

Whether a moderator should move it to the JCL forum or DFSORT forum will depend on whether you are using SYNCSORT or DFSORT. I suggest you post whichever sort product you use and ask for it to be moved as appropriate.

SYNCSORT -> JCL forum
DFSORT -> DFSORT forum

Garry.
Back to top
View user's profile Send private message
Nageshwar Vedula

New User


Joined: 21 Oct 2011
Posts: 9
Location: India

PostPosted: Thu Nov 03, 2011 9:27 pm
Reply with quote

I use SYNCSORT
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Nov 03, 2011 10:18 pm
Reply with quote

Hello,

Your topic has been moved to where Syncsort topics are supported (JCL part of the forum).

Suggest you look at JOINKEYS.

Which release of Syncsort is being used (this is shown on the top of the informational output generated by a sort execution).
Back to top
View user's profile Send private message
Nageshwar Vedula

New User


Joined: 21 Oct 2011
Posts: 9
Location: India

PostPosted: Thu Nov 03, 2011 10:50 pm
Reply with quote

Its mentioned as SYNCSORT FOR Z/OS 1.3.1.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Nov 03, 2011 10:53 pm
Reply with quote

Hello,

JOINKEYS is supported in your release according to the manual.

Suggest you search in the JCL part of our forum as there have been several topics about JOINKEYS.

If you find something that is not clear, post what you found and your doubt. Someone will be able to clarify.
Back to top
View user's profile Send private message
Nageshwar Vedula

New User


Joined: 21 Oct 2011
Posts: 9
Location: India

PostPosted: Thu Nov 03, 2011 10:57 pm
Reply with quote

ok Sure. Thank you.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Fri Nov 04, 2011 8:58 am
Reply with quote

Hi,

after your write output from DELDD DD to a dataset, you can use this,
again this is untested as GROUP function is not available for me to test.


Code:
//STEP0020 EXEC PGM=SORT                                             
//SYSOUT   DD SYSOUT=*                                               
//SORTIN   DD DSN=input-file from DELDD DD                           
//            DISP=SHR                                               
//SORTOUT  DD SYSOUT=*                                               
//SYSIN    DD *                                                       
 SORT FIELDS=COPY                                                     
 INREC IFTHEN=(WHEN=GROUP,BEGIN=(3,1,CH,EQ,C'-'),PUSH=(81:1,3))       
 OUTFIL INCLUDE=(1,3,CH,NE,C'*M-',AND,81,3,CH,EQ,C'*M-'),             
        BUILD=(1,80)                                                 
/*                                                                   


Gerry
Back to top
View user's profile Send private message
Nageshwar Vedula

New User


Joined: 21 Oct 2011
Posts: 9
Location: India

PostPosted: Mon Nov 07, 2011 3:41 pm
Reply with quote

Hi Gerry,
I tried your solution, but getting the below error.

Code:
SYNCSORT FOR Z/OS  1.3.1.0R    U.S. PATENTS: 4210961, 5117495   (C) 2007
                                                      z/OS   1.11.0
SYNCSORT LICENSED FOR CPU SERIAL NUMBER 29773, MODEL 2096 V02
SYSIN :
 SORT FIELDS=COPY
 INREC IFTHEN=(WHEN=GROUP,BEGIN=(3,1,CH,EQ,C'-'),PUSH=(101:1,3))
                                    *
 OUTFIL INCLUDE=(1,3,CH,NE,C'*M-',AND,101,3,CH,EQ,C'*M-'),
         BUILD=(1,100)
WER268A  INREC STATEMENT   : SYNTAX ERROR
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000

Code'd

Pls help. Thank you.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Nov 07, 2011 3:47 pm
Reply with quote

You need a Syncsort solution. Have you got your manual handy?

Maybe the topic can be split into the JCL forum at this stage?

Edit: Whoops, already in JCL it seems. Perhaps still a split? "Using Syncsort to list matched records" or whatever. I'm rushing to beat the 10 minute deadline, so can't check if name is reasonable...
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Nov 08, 2011 12:05 am
Reply with quote

Hello,

If you had used the Code Tag, your post would have been easier to read. It has now been coded. . .

Your control statement looks incorrect. You may need an END= if you use BEGIN= or you may need to remove the WHEN=GROUP and use only the
IFTHEN=(WHEN=(1,1,CH,EQ,C’S’), form.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Tue Nov 08, 2011 2:59 am
Reply with quote

Hi,

If I run the code I provided, I get the following error
Code:
 SYNCSORT FOR Z/OS  1.3.1.0N    U.S. PATENTS: 4210961, 5117495   (C) 2007 SYNCSO
                                                       z/OS   1.9.0             
 SYNCSORT LICENSED FOR CPU SERIAL NUMBER 1EAED, MODEL 2096 N02             LICEN
 SYSIN :                                                                       
  SORT FIELDS=COPY                                                             
  INREC IFTHEN=(WHEN=GROUP,BEGIN=(3,1,CH,EQ,C'-'),PUSH=(101:1,3))               
                     *                                                         
  OUTFIL INCLUDE=(1,3,CH,NE,C'*M-',AND,101,3,CH,EQ,C'*M-'),                     
          BUILD=(1,100)                                                         
 WER268A  INREC STATEMENT   : SYNTAX ERROR                                     
 WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000                                 
 WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE                                 


I think your SYNCSORT like mine does not support the WHEN=GROUP function. Note the error points to GROUP and not to BEGIN=(3,1,


Gerry
Back to top
View user's profile Send private message
Nageshwar Vedula

New User


Joined: 21 Oct 2011
Posts: 9
Location: India

PostPosted: Tue Nov 08, 2011 3:46 am
Reply with quote

oh.....ok. So is there any alternative for WHEN=GROUP function in SYNCSORT.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Nov 08, 2011 4:06 am
Reply with quote

Did you try Dick's suggestion from 18:35 today?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Nov 08, 2011 8:22 am
Reply with quote

Hello,

My 1.3 manual shows that WHEN=GROUP is supported. I suspect the problem is the syntax. I don't have a 1.3 Syncsort system to experiment on.

I also suspect that my "Code'd" correction is not aligned properly because the "stuff" i coded had been modified before i got there. . .

My home pc does not have the Syncsort documentation (something i plan on correcting soon) icon_smile.gif

If someone reminds me on Tuesday, i'll copy/paste a small example from the 1.3 manual icon_wink.gif
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Tue Nov 08, 2011 8:57 am
Reply with quote

Hi,

this link points to SyncSort for z/OS Release 1.3.2 supporting WHEN=GROUP

ibmmainframes.com/viewtopic.php?t=49755&highlight=wer268a+syncsort+group


Gerry
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Tue Nov 08, 2011 11:41 am
Reply with quote

Hi,
Superc with long listing provides both the matched and difference records,
if we have a SORT step to omit unwanted(insertions/deletions) records then we would have only the matched records in output,

A crude test job,
Code:


//SUPERC  EXEC PGM=ISRSUPC,       
//            PARM=(LONGL,LINECMP,
//            '',                 
//            '')                 
//NEWDD  DD DSN=WELLS.NEWFILE, 
//          DISP=SHR             
//OLDDD  DD DSN==WELLS.OLDFILE,   
//          DISP=SHR             
//OUTDD  DD DSN=WELLS.SUPERC.LIST,DISP=OLD
//*
//JS010    EXEC PGM=SORT                                               
//SORTIN   DD DISP=SHR,DSN=WELLS.SUPERC.LIST                         
//SORTOUT  DD DISP=OLD,DSN=WELLS.MATCHING.LINES                             
//SYSOUT   DD SYSOUT=*                                                 
//SYSIN DD *                                                           
  OPTION COPY                                                           
  OMIT COND=((1,5,SS,EQ,C' ID  '),OR,                                   
             (1,5,SS,EQ,C' D - '),OR,                                   
             (1,5,SS,EQ,C' I - '),OR,                                   
             (1,5,SS,EQ,C'1  IS'),OR,                                   
             (1,5,SS,EQ,C' NEW:'),OR,                                   
             (1,36,CH,EQ,C'                                    '),OR,   
             (1,36,CH,EQ,C'                      LISTING OUTPUT'),OR,   
             (1,25,CH,EQ,C'     ----+----1----+----2'))                 
/*                                                                     


I am open to corrections
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Nov 08, 2011 8:13 pm
Reply with quote

Hello,

Quote:
My 1.3 manual shows that WHEN=GROUP is supported.
My bad . . . icon_redface.gif

My 1.3 documentation includes changes up thru 1.3.2 - which has the WHEN=GROUP support. I must have replaced the original 1.3 material with the newer update. The 1.3.1 does not support WHEN=GROUP as has been mentioned. Apologies for the false lead. . . icon_neutral.gif

@Nageshwar Rao Vedula - as even 1.3.2 has been around for quite a while, possibly your product could be upgraded to the newest 1.4 which has WHEN=GROUP and a whole lot more.
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 Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Join multiple records using splice DFSORT/ICETOOL 5
No new posts EZT program to build a flat file with... All Other Mainframe Topics 9
No new posts JCL sortcard to print only the records DFSORT/ICETOOL 11
Search our Forums:

Back to Top