| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| ironponygrl Beginner
 
  
 Joined: 22 Mar 2013
 Posts: 21
 Topics: 7
 Location: Fort Worth, TX
 
 | 
			
				|  Posted: Wed Jun 11, 2014 9:32 am    Post subject: DFSORT Joinkeys for matches of variable length files? |   |  
				| 
 |  
				| I have searched and read the application programmers guide and I still don't get what I'm doing wrong. 
 I have two variable length files, IN1 and IN2.  Key field is 15 bytes long starting in 15 and 7 respectively.   I want to  eliminate records from IN1 that don't have a match on IN2.  I'm almost there, but not quite.  any help?
 
 here is what i have so far:
 
  	  | Code: |  	  | //STEP0100 EXEC PGM=SORT
 //SYSOUT   DD SYSOUT=*
 //IN1      DD DISP=SHR,DSN=TEST.SB103055.VISION2.DW7
 //IN2      DD DISP=SHR,DSN=TEST.SB133010.PRLLNEW1.MA04.J085.DW7
 //SORTOUT  DD DISP=OLD,DSN=TEST.SB103055.VISION3.DW7
 //ONLYF1   DD SYSOUT=*
 //ONLYF2   DD SYSOUT=*
 //SYSIN    DD *
 JOINKEYS F2=IN2,FIELDS=(11,15,A)
 JOINKEYS F1=IN1,FIELDS=(19,15,A)
 OPTION COPY
 REFORMAT FIELDS=(F1:1)
 //*
 
 | 
 
 
  	  | Code: |  	  | Data Set Name . . . . : TEST.SB103055.VISION2.DW7
 
 General Data                           Current Allocation
 Management class . . : MCTEST          Allocated tracks  . : 152
 Storage class  . . . : SCSTD           Allocated extents . : 5
 Volume serial . . . : D93051
 Device type . . . . : 3390
 Data class . . . . . : **None**
 Organization  . . . : PS             Current Utilization
 Record format . . . : VB              Used tracks . . . . : 2
 Record length . . . : 3925            Used extents  . . . : 3
 Block size  . . . . : 27998
 1st extent tracks . : 1
 Secondary tracks  . : 50             Dates
 Data set name type  :                 Creation date . . . : 2014/03/17
 SMS Compressible. . : NO              Referenced date . . : 2014/06/11
 
 | 
 
  	  | Code: |  	  | VIEW       TEST.SB103055.VISION2.DW7                       Columns 00001 00072
 Command ===>                                                  Scroll ===> CSR
 ****** ***************************** Top of Data ******************************
 000001  M5          102014100305530017S69S69F55600  120000000000
 000002  M4          102014100305530017S69S69C00352437
 000003  M5          102014100305640010S69S69F55600  120000000000
 000004  M4          102014100305640010S69S69C00353000
 000005  M5          102014100305680014S69S69F55600  120000000000  F50301   420
 000006  M4          102014100305680014S69S69C00353000
 000007  M5          102014101304450018S69S69F55600  120000000000
 000008  M4          102014101304450018S69S69C003412436           C00356864
 000009  M5          102014104305080012S69S69F55600  120000000000
 000010  M4          102014104305080012S69S69C00355499
 000011  M5          102014104305090013S69S69F55600  120000000000
 000012  M4          102014104305090013S69S69C00354381
 
 | 
 
 
  	  | Code: |  	  | Data Set Name . . . . : TEST.SB133010.PRLLNEW1.MA04.J085.DW7
 
 General Data                           Current Allocation
 Management class . . : MCTEST          Allocated cylinders : 1
 Storage class  . . . : SCSTD           Allocated extents . : 1
 Volume serial . . . : D93050
 Device type . . . . : 3390
 Data class . . . . . : **None**
 Organization  . . . : PS             Current Utilization
 Record format . . . : VB              Used cylinders  . . : 1
 Record length . . . : 7444            Used extents  . . . : 1
 Block size  . . . . : 27998
 1st extent cylinders: 1
 Secondary cylinders : 150            Dates
 Data set name type  :                 Creation date . . . : 2014/06/10
 SMS Compressible. . : NO              Referenced date . . : 2014/06/11
 Expiration date . . : ***None***
 
 | 
 
  	  | Code: |  	  | VIEW       TEST.SB133010.PRLLNEW1.MA04.J085.DW7            Columns 00001 00072
 Command ===>                                                  Scroll ===> CSR
 ****** ***************************** Top of Data ******************************
 000001 J  Y20141600014
 000002 M33BND10201329130005003900226096     0013082500056901101   12
 000003 M33BND10201329130016024000270449     0013102500062110701   12
 000004 M33BND10201329430000071200294505     0012112500067276701   12
 000005 M33BND10201329430003010900062517     0013082500032338301   12
 000006 M33BND10201329430006044700117338     0013082500040940001   12
 000007 M33BND10201329830008011800304220     0013102500069496401   12
 | 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| William Collins Supermod
 
 
 Joined: 03 Jun 2012
 Posts: 437
 Topics: 0
 
 
 | 
			
				|  Posted: Wed Jun 11, 2014 9:49 am    Post subject: |   |  
				| 
 |  
				| You haven't actually said what is wrong. 
 Are you sure of your start positions?
 
 If you are only using the key from the second file, you should cut down the data in JNF2CNTL to only include the key.
 
 If either file is already in order on the key, you should specify SORTED,NOSEQCK on the JOINKEYS.
 
 Although the F1:1 should work, I think it is much clearer to use F1:1,4,5
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| ironponygrl Beginner
 
  
 Joined: 22 Mar 2013
 Posts: 21
 Topics: 7
 Location: Fort Worth, TX
 
 | 
			
				|  Posted: Wed Jun 11, 2014 10:13 am    Post subject: |   |  
				| 
 |  
				| dang, i thought i was being so thorough in my posting.  I was getting an error saying that my reformat needed RDW.  ( i had thought the F1:1 would work as well).  but when I specified , it works now.  Sorry I didnt make it back over here to delete my question after I found the solution on my own.  i appreciate the reponse nonetheless 	  | Code: |  	  | REFORMAT FIELDS=(F1:1,4,5) | 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| kolusu Site Admin
 
  
 
 Joined: 26 Nov 2002
 Posts: 12394
 Topics: 75
 Location: San Jose
 
 | 
			
				|  Posted: Wed Jun 11, 2014 11:07 am    Post subject: |   |  
				| 
 |  
				|  	  | ironponygrl wrote: |  	  | Sorry I didnt make it back over here to delete my question after I found the solution on my own.  i appreciate the reponse nonetheless | 
 
 Glad you found the solution on your own. You cannot delete a post, but it would good if someone in future run into the same problem and will have a solution right away.
 
 Btw I edited your initial post to add code tags so that the spacing is retained and the code is readable.
 
 Here is a sample of how the code tags work.
 
 http://www.mvsforums.com/helpboards/viewtopic.php?p=19031#19031
 _________________
 Kolusu
 www.linkedin.com/in/kolusu
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| ironponygrl Beginner
 
  
 Joined: 22 Mar 2013
 Posts: 21
 Topics: 7
 Location: Fort Worth, TX
 
 | 
			
				|  Posted: Wed Jun 11, 2014 1:00 pm    Post subject: |   |  
				| 
 |  
				| oh, cool, that makes it look much better. |  | 
	
		| Back to top |  | 
	
		|  | 
	
		|  | 
	
		|  |