| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| sivafdms Intermediate
 
 
 Joined: 29 May 2007
 Posts: 165
 Topics: 77
 
 
 | 
			
				|  Posted: Wed Sep 24, 2014 9:43 am    Post subject: Count & Compare record totals in 2 files using Syncsort |   |  
				| 
 |  
				| 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 |  | 
	
		|  | 
	
		| kolusu Site Admin
 
  
 
 Joined: 26 Nov 2002
 Posts: 12394
 Topics: 75
 Location: San Jose
 
 | 
			
				|  Posted: Wed Sep 24, 2014 11:06 am    Post subject: |   |  
				| 
 |  
				| Yikes *Deleted the solution after noticing the product in the title* _________________
 Kolusu
 www.linkedin.com/in/kolusu
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| sivafdms Intermediate
 
 
 Joined: 29 May 2007
 Posts: 165
 Topics: 77
 
 
 | 
			
				|  Posted: Wed Sep 24, 2014 11:37 am    Post subject: |   |  
				| 
 |  
				| Kolusu, 
 It was a typo .. to mention Synsort in title.
 
 Thanks,
 Siva
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| kolusu Site Admin
 
  
 
 Joined: 26 Nov 2002
 Posts: 12394
 Topics: 75
 Location: San Jose
 
 | 
			
				|  Posted: Wed Sep 24, 2014 12:13 pm    Post subject: |   |  
				| 
 |  
				| sivafdms, 
 Don't post the same question over and over.
 
 
 Thanks
 
 Kolusu
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| sivafdms Intermediate
 
 
 Joined: 29 May 2007
 Posts: 165
 Topics: 77
 
 
 | 
			
				|  Posted: Wed Sep 24, 2014 12:23 pm    Post subject: |   |  
				| 
 |  
				| 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 |  | 
	
		|  | 
	
		| kolusu Site Admin
 
  
 
 Joined: 26 Nov 2002
 Posts: 12394
 Topics: 75
 Location: San Jose
 
 | 
			
				|  Posted: Wed Sep 24, 2014 12:29 pm    Post subject: |   |  
				| 
 |  
				|  	  | 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
 www.linkedin.com/in/kolusu
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| sivafdms Intermediate
 
 
 Joined: 29 May 2007
 Posts: 165
 Topics: 77
 
 
 | 
			
				|  Posted: Wed Sep 24, 2014 1:14 pm    Post subject: |   |  
				| 
 |  
				| Kolusu, 
 option copy doesnot work on DFSORT.
 
 Thanks,
 Siva
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| kolusu Site Admin
 
  
 
 Joined: 26 Nov 2002
 Posts: 12394
 Topics: 75
 Location: San Jose
 
 | 
			
				|  Posted: Wed Sep 24, 2014 1:33 pm    Post subject: |   |  
				| 
 |  
				|  	  | 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
 www.linkedin.com/in/kolusu
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| sivafdms Intermediate
 
 
 Joined: 29 May 2007
 Posts: 165
 Topics: 77
 
 
 | 
			
				|  Posted: Wed Sep 24, 2014 10:16 pm    Post subject: |   |  
				| 
 |  
				| 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 |  | 
	
		|  | 
	
		| sivafdms Intermediate
 
 
 Joined: 29 May 2007
 Posts: 165
 Topics: 77
 
 
 | 
			
				|  Posted: Thu Sep 25, 2014 4:29 am    Post subject: |   |  
				| 
 |  
				| 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 |  | 
	
		|  | 
	
		| kolusu Site Admin
 
  
 
 Joined: 26 Nov 2002
 Posts: 12394
 Topics: 75
 Location: San Jose
 
 | 
			
				|  Posted: Thu Sep 25, 2014 11:13 am    Post subject: |   |  
				| 
 |  
				|  	  | 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
 www.linkedin.com/in/kolusu
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| William Collins Supermod
 
 
 Joined: 03 Jun 2012
 Posts: 437
 Topics: 0
 
 
 | 
			
				|  Posted: Thu Sep 25, 2014 12:00 pm    Post subject: |   |  
				| 
 |  
				| 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 |  | 
	
		|  | 
	
		|  | 
	
		|  |