MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Count & Compare record totals in 2 files using Syncsort

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
sivafdms
Intermediate


Joined: 29 May 2007
Posts: 165
Topics: 77

PostPosted: Wed Sep 24, 2014 9:43 am    Post subject: Count & Compare record totals in 2 files using Syncsort Reply with quote

Hi,

I have two sequential input files (f1 & f2) which are both RECFM=FB, LRECL=80.

I want to compare two files & check the no of records in both files using SORT and display as below.

If record count in F1 > F2 display " First files has more records'
If record count in f1 = f2 display " Both files have same records'
If record count in F1 < f2 display " second file has more records'

Thanks,
Siva
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12370
Topics: 75
Location: San Jose

PostPosted: Wed Sep 24, 2014 11:06 am    Post subject: Reply with quote

Yikes *Deleted the solution after noticing the product in the title*
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
sivafdms
Intermediate


Joined: 29 May 2007
Posts: 165
Topics: 77

PostPosted: Wed Sep 24, 2014 11:37 am    Post subject: Reply with quote

Kolusu,

It was a typo .. to mention Synsort in title.

Thanks,
Siva
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12370
Topics: 75
Location: San Jose

PostPosted: Wed Sep 24, 2014 12:13 pm    Post subject: Reply with quote

sivafdms,

Don't post the same question over and over.


Thanks

Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
sivafdms
Intermediate


Joined: 29 May 2007
Posts: 165
Topics: 77

PostPosted: Wed Sep 24, 2014 12:23 pm    Post subject: Reply with quote

Kolusu,

Apologies.. i thought the title has syncsort init so that the reason it reposted the question. Can you please provide me the solution

Thanks,
Siva.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12370
Topics: 75
Location: San Jose

PostPosted: Wed Sep 24, 2014 12:29 pm    Post subject: Reply with quote

sivafdms wrote:
Kolusu,

Apologies.. i thought the title has syncsort init so that the reason it reposted the question. Can you please provide me the solution

Thanks,
Siva.


Please run the following job and show me the complete sysout which will help us determine the level of DFSORT you have.

Code:

//STEP0100 EXEC PGM=SORT       
//SYSOUT   DD SYSOUT=*         
//SORTIN   DD *               
//SORTOUT  DD SYSOUT=*         
//SYSIN    DD *               
  OPTION COPY                 
//*

_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
sivafdms
Intermediate


Joined: 29 May 2007
Posts: 165
Topics: 77

PostPosted: Wed Sep 24, 2014 1:14 pm    Post subject: Reply with quote

Kolusu,

option copy doesnot work on DFSORT.

Thanks,
Siva
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12370
Topics: 75
Location: San Jose

PostPosted: Wed Sep 24, 2014 1:33 pm    Post subject: Reply with quote

sivafdms wrote:
Kolusu,

option copy doesnot work on DFSORT.

Thanks,
Siva


Says who? If your SHOP has DFSORT , OPTION COPY statement is supported from late 80's.

Can you show me the sysout showing the error you got using statement OPTION COPY?
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
sivafdms
Intermediate


Joined: 29 May 2007
Posts: 165
Topics: 77

PostPosted: Wed Sep 24, 2014 10:16 pm    Post subject: Reply with quote

Hi Kolusu,

I thought OPTION COPY works only on SYNCSORT and not on DFSORT. I will the above job and show you the sysout.

Thanks,
Siva
Back to top
View user's profile Send private message
sivafdms
Intermediate


Joined: 29 May 2007
Posts: 165
Topics: 77

PostPosted: Thu Sep 25, 2014 4:29 am    Post subject: Reply with quote

Kolusu,

After running above job , we got below sysout and looks like my shop is using SYNCSORT.

Code:


SYNCSORT LICENSED FOR CPU SERIAL NUMBER 16C8D, MODEL 2827 706             
SYSIN :                                                                   
    OPTION COPY                                                           
WER276B  SYSDIAG= 6387539, 12028120, 12028120, 6164925                   
WER164B  8,864K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,       
WER164B     0 BYTES RESERVE REQUESTED, 272K BYTES USED                   
WER146B  32K BYTES OF EMERGENCY SPACE ALLOCATED                           
WER108I  SORTIN   : RECFM=FB   ; LRECL=    80; BLKSIZE=    80             
WER110I  SORTOUT  : RECFM=FB   ; LRECL=    80; BLKSIZE=    80             
WER410B  7,836K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE, 
WER410B     0 BYTES RESERVE REQUESTED, 156K BYTES USED                   
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000                             
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE                             
WER416B  BSAM WAS USED FOR SORTIN                                         
WER416B  BSAM WAS USED FOR SORTOUT                                       
WER054I  RCD IN          1, OUT          1                               
WER169I  RELEASE 1.3 BATCH 0506 TPF LEVEL 2.1                             
WER052I  END SYNCSORT - ND9859AS,STEP010,,DIAG=E000,6242,C880,0044,A87E,4C

Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12370
Topics: 75
Location: San Jose

PostPosted: Thu Sep 25, 2014 11:13 am    Post subject: Reply with quote

sivafdms wrote:
Hi Kolusu,

I thought OPTION COPY works only on SYNCSORT and not on DFSORT. I will the above job and show you the sysout.

Thanks,
Siva


Siva,

You assume a lot. When you assumed that a sample job doesn't work, what is the point of seeking a solution from a DFSORT developer ? You seem to know more than the people who develop and support the product.

Anyway your are running Syncsort, so the DFSORT solution will not run on your system.
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
William Collins
Supermod


Joined: 03 Jun 2012
Posts: 437
Topics: 0

PostPosted: Thu Sep 25, 2014 12:00 pm    Post subject: Reply with quote

Siva,

Why do you want to do this task anyway? Can't you just look at counts from whatever last processed the two files?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group