Portal | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Undesired result while joining files.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT
View previous topic :: :: View next topic  
Author Message
Khupe

New User


Joined: 22 Sep 2020
Posts: 1
Location: Asia

PostPosted: Tue Sep 22, 2020 8:05 pm    Post subject: Undesired result while joining files.
Reply with quote

Hi,

I need to join 2 files and write matching records to output. Below are the details of file.

File 1 - VB/LRECL=80
File 2 - FB/LRECL=350

File 1 Keys : 1-8, 9-16
File 2 Keys : 12-19, 46-53

Join of keys: 1-8 vs 12-19 and 9-16 vs 46-53

Also I need to OMIT below records from join operation
- those with * in 1st pos of File 1
- those with 'IGNORE' in 1st 6 bytes of File 2

I've tried with below code, but my job ends with RC=0 and the output file is blank and I'm sure there are matching records in both files. Can anybody please let me know if you think something is incorrect here. Thanks.


Code:

//STEP01  EXEC PGM=SORT                                     
//SYSOUT DD SYSOUT=*                                         
//SORTJNF1 DD DISP=SHR,DSN=File 1             
//SORTJNF2 DD DISP=SHR,DSN=File 2
//SORTOUT  DD SYSOUT=*
//SYSIN    DD   *                                           
  JOINKEYS FILE=F1,FIELDS=(5,8,A,13,8,A),                   
     OMIT=(5,1,CH,EQ,C'*')                                   
  JOINKEYS FILE=F2,FIELDS=(12,8,A,46,8,A),                   
     OMIT=(1,6,CH,EQ,C'IGNORE')                             
  REFORMAT FIELDS=(F2:12,43)                                 
  SORT FIELDS=(1,43,CH,A)                                   
  DUPKEYS FIELDS=NONE                                       
  OUTFIL FNAMES=SORTOUT,VTOF,BUILD=(1,18,1X,19,24)           



Below is the SYSOUT from the step

Code:
WER813I  INSTALLATION OPTIONS IN MFX LOAD LIBRARY WILL BE USED                 
WER276B  SYSDIAG= 299500, 14716473, 14716473, 42790950                         
WER164B  30,156K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,           
WER164B     0 BYTES RESERVE REQUESTED, 29,028K BYTES USED                     
WER146B  20K BYTES OF EMERGENCY SPACE ALLOCATED                               
WER481I  JOINKEYS REFORMAT RECORD LENGTH=   43, TYPE = F                       
WER110I  SORTOUT  : RECFM=FB   ; LRECL=    43; BLKSIZE= 27993                 
WER074I  SORTOUT  : DSNAME=<output file>                       
WER410B  29,128K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16-MEGABYTE LINE,
WER410B     0 BYTES RESERVE REQUESTED, 28,032K BYTES USED                     
WER036B  G=80391                                                               
WER045C  END SORT PHASE                                                       
WER405I  SORTOUT  :  DATA RECORDS OUT          0; TOTAL RECORDS OUT          0
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000                                 
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE                                 
WER416B  OUTFIL WAS USED FOR SORTOUT                                           
WER246I  FILESIZE 0 BYTES                                                     
WER054I  RCD IN          0, OUT          0                                     
WER072I  EQUALS, BALANCE IN EFFECT                                             
WER169I  RELEASE 2.1 BATCH 0539 TPF LEVEL 6.0                                 
WER482I  JNF1 STATISTICS                                                       
WER483B  1,824K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,             
WER483B     0 BYTES RESERVE REQUESTED, 2,496K BYTES USED                       
WER108I  SORTJNF1 : RECFM=VB   ; LRECL=    80; BLKSIZE= 27998                 
WER073I  SORTJNF1 : <File 1>                               
WER483B  792K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16-MEGABYTE LINE,   
WER483B     0 BYTES RESERVE REQUESTED, 1,516K BYTES USED                       
WER483B  G=1118,SEGLEN=1832                                                   
WER484I  SORTJNF1 : RCD IN= 10,OMITTED= 6,PAIRED= 0,UNPAIRED= 4               
WER416B  SORTJNF1 : EXCP'S=2,UNIT=3390,DEV=61B1,CHP=(BCFC783C3A38,1),VOL=ATST32
WER416B  TOTAL OF 2 EXCP'S ISSUED FOR SORTING                                 
WER487I  FILESIZE 76 BYTES                                                     
WER482I  JNF2 STATISTICS                                                       
WER483B  14,088K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,           
WER483B     0 BYTES RESERVE REQUESTED, 13,600K BYTES USED                     
WER108I  SORTJNF2 : RECFM=FB   ; LRECL=   350; BLKSIZE= 27650                 
WER073I  SORTJNF2 : DSNAME=<File 2>                       
WER483B  13,056K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16-MEGABYTE LINE,
WER483B     0 BYTES RESERVE REQUESTED, 13,056K BYTES USED                     
WER483B  G=3051,B=150,BIAS=93                                                 
WER483B  0 PREALLOCATED SORTWORK TRACKS, 2,175 DYNAMICALLY ALLOCATED,         
WER483B  0 ACQUIRED IN SECONDARY EXTENTS, 0 RELEASED, TOTAL 2,096 TRACKS USED 
WER484I  SORTJNF2 : RCD IN= 365223,OMITTED= 58095,PAIRED= 0,UNPAIRED= 307128   
WER333I  ZHPF USED FOR INPUT                                                   
WER416B  SORTJNF2 : EXCP'S=263,UNIT=3390,DEV=6211,CHP=(18987C7A9AD8,1),VOL=ANDV
WER416B  JNF2WK01 : EXCP'S=10,UNIT=3390,DEV=60B4,CHP=BCFC783C3A38,VOL=AWRK35   
WER416B  JNF2WK02 : EXCP'S=6,UNIT=3390,DEV=67AA,CHP=BCFC783C3A38,VOL=AWRK12   
WER416B  JNF2WK03 : EXCP'S=3,UNIT=3390,DEV=66A1,CHP=BCFC783C3A38,VOL=AWRK19   
<Removed few work dataset logs>
WER416B  TOTAL OF 121 EXCP'S ISSUED FOR SORTWORKS                             
WER416B  TOTAL OF 384 EXCP'S ISSUED FOR SORTING                               
WER487I  FILESIZE 107,494,800 BYTES                                           
WER052I  END SYNCSORT - $SORTFIL,XTRELMT,,DIAG=C000,C213,E892,EC75,897E,6CAB,22
WER052I  DIAG1=C400,52C0,E892,2C75,8D6E,68EB,2640,2666,0100,0103               
WER052I  DIAG2=A300,F81F,8A92,E0C6,EB6E,4CA3,8A40,6467,0100,0103               
Back to top
View user's profile Send private message

Joerg.Findeisen

Active User


Joined: 15 Aug 2015
Posts: 343
Location: Bamberg, Germany

PostPosted: Tue Sep 22, 2020 8:15 pm    Post subject:
Reply with quote

This topic should be moved to the SYNCSORT section. icon_exclaim.gif
Back to top
View user's profile Send private message
sergeyken

Active Member


Joined: 29 Apr 2008
Posts: 865
Location: Maryland

PostPosted: Tue Sep 22, 2020 8:42 pm    Post subject:
Reply with quote

Your SORT log clearly says that no pairing (matching) record has been found in your two input datasets.

You need to verify the physical content of your actual datasets in any manner to find out: why they do not match?

This is the question for a first year student, not for the IT experts forum... 36_8_9.gif
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2422
Location: Hampshire, UK

PostPosted: Wed Sep 23, 2020 4:45 am    Post subject: Reply to: Undesired result while joining files.
Reply with quote

Topic moved. DFSort is not being used but SyncSort.
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 -> SYNCSORT All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Group comparison/update between two f... premnath DFSORT/ICETOOL 8 Thu Oct 22, 2020 4:27 am
No new posts Need assistance formatting when joini... chillmo SYNCSORT 8 Wed Oct 21, 2020 10:56 am
No new posts Combining more 4 files with sorted or... bshkris DFSORT/ICETOOL 3 Thu Oct 08, 2020 10:57 am
No new posts SEPARATE UNIQUE and NON-UNIQUE in SEP... mohitsethi SYNCSORT 6 Thu Oct 01, 2020 9:47 pm
No new posts Dynamically read input files using BP... Srinivas B COBOL Programming 20 Sat Sep 05, 2020 1:48 pm

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