Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Syncsort Match 2 VSAM files to create the Output

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Dhaneshkumar

New User


Joined: 17 May 2010
Posts: 4
Location: Banglore

PostPosted: Sat Oct 30, 2010 12:13 am    Post subject: Syncsort Match 2 VSAM files to create the Output
Reply with quote

I have two KSDS files. Attributes are as follows :

File 1: LRECL – 160 ( VB ) , Key - 1 to 40 byte

File 2 : LRECL – 50byte ( VB) - Key : 1 to 16 byte

In this the second file's key is available either in the 4th postion or in the 16th position of the first file.
we need to fetch the 40 byte key from first file using the 16byte key( Second file’s key).

I tried JOINKEYS but it did not work.

FILE1

CBC000040110001XXXX2090000015XX XXXXXXXXXXXXXXXXXXXXXXXX
CFC284190100001XXXX7300500880XX AAAAAAA01OTOMLP489 AAAAAA
CFC295440100001XXXX7300500886XX XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
CFC215220100001XXXX7390000010XX AAAAA1 XXXXXXXXX
CFMXXXX7390000010XX000000000000 215220100001 EVERGREE
CFMXXXX7390000010XX0000217026 215220100001 MIKE REE

FILE2

XXXX7300500880XX
XXXX7300500886XX
XXXX7390000010XX


OUTPUT FILE

CFC284190100001XXXX7300500880XX
CFC295440100001XXXX7300500886XX
CFC215220100001XXXX7390000010XX
CFMXXXX7390000010XX000000000000
CFMXXXX7390000010XX0000217026

CODE

Code:
//PS040  EXEC PGM=SYNCSORT
//SYSOUT   DD SYSOUT=*                                   
//SORTJNF1 DD DISP=SHR,DSN=FILE1                         
//SORTJNF2 DD DISP=SHR,DSN=FILE2                         
//SORTOUT  DD DSN=OUTFILE,                               
//            UNIT=PERMDA,                               
//            SPACE=(TRK,(100,200),RLSE),                 
//            DISP=(,KEEP,DELETE)
//SYSIN    DD *                                           
  JOINKEYS FILES=F1,FIELDS=(1,16,A,1,16,A),TYPE=V         
  JOINKEYS FILES=F2,FIELDS=(4,16,A,16,16,A),TYPE=V       
  REFORMAT FILEDS=(F2:1,40)                               
  SORT FIELDS=COPY                                       
/*


SYSOUT:

SYSIN :
JOINKEYS FILES=F1,FIELDS=(1,16,A,1,16,A),TYPE=V
JOINKEYS FILES=F2,FIELDS=(4,16,A,16,16,A),TYPE=V
REFORMAT FIELDS=(F2:1,40)
SORT FIELDS=COPY
WER901I **WARNING** SYNCSORT 1.3.2.2 WILL EXPIRE IN 43 DAYS
WER276B SYSDIAG= 263068, 1558197, 1558197, 2775375
WER164B 60,900K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 100K BYTES RESERVE REQUESTED, 1,126,416 BYTES USED
WER146B 16K BYTES OF EMERGENCY SPACE ALLOCATED
WER481I JOINKEYS REFORMAT RECORD LENGTH= 40, TYPE = F
WER110I SORTOUT : RECFM=FB ; LRECL= 40; BLKSIZE= 27960
WER410B 59,772K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE
WER410B 0 BYTES RESERVE REQUESTED, 100K BYTES USED
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
WER416B SORTOUT : EXCP'S=0,UNIT=3390,DEV=908A,CHP=(ABAFACB0ADB1AE,1),V
WER416B TOTAL OF 0 EXCP'S ISSUED FOR COPYING
WER054I RCD IN 0, OUT 0
WER072I NOEQUALS, BALANCE IN EFFECT
WER169I RELEASE 1.3 BATCH 0506 TPF LEVEL 2.2
WER482I JNF1 STATISTICS
WER483B 1,032K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER483B 0 BYTES RESERVE REQUESTED, 1,004K BYTES USED
WER108I SORTJNF1 : RECFM=V ; LRECL= 50; CISIZE = 7680
WER483B G=9358,B=8560,SEGLEN=56,BIAS=80
WER483B 0 PREALLOCATED SORTWORK TRACKS, 150 DYNAMICALLY ALLOCATED,
WER483B 0 ACQUIRED IN SECONDARY EXTENTS, 0 RELEASED, TOTAL OF 91 TRA
WER484I SORTJNF1 : RCD IN= 77886,OMITTED= 0,PAIRED= 0,UNPAIRED= 77886
WER416B VSAM WAS USED FOR SORTJNF1
WER416B JNF1WK01 : EXCP'S=137,UNIT=3390,DEV=9186,CHP=ABAFACB0ADB1AE,VOL
WER416B JNF1WK02 : EXCP'S=137,UNIT=3390,DEV=9500,CHP=B3B7B4B8B5B2B6,VOL
WER416B TOTAL OF 274 EXCP'S ISSUED FOR SORTWORKS
WER487I FILESIZE 4,205,844 BYTES
WER482I JNF2 STATISTICS
WER483B 1,032K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER483B 0 BYTES RESERVE REQUESTED, 1,004K BYTES USED
WER108I SORTJNF2 : RECFM=V ; LRECL= 160; CISIZE = 4096
WER483B G=6916,B=8560,SEGLEN=80,BIAS=99
WER483B 0 PREALLOCATED SORTWORK TRACKS, 1,260 DYNAMICALLY ALLOCATED,
WER483B 26,460 ACQUIRED IN 12 SECONDARY EXTENTS, 0 RELEASED, TOTAL O
WER484I SORTJNF2 : RCD IN= 11151545,OMITTED= 0,PAIRED= 0,UNPAIRED= 1115
WER416B VSAM WAS USED FOR SORTJNF2
WER416B JNF2WK01 : EXCP'S=35912,UNIT=3390,DEV=9636,CHP=B3B7B4B8B5B2B6,V
WER416B JNF2WK02 : EXCP'S=35932,UNIT=3390,DEV=9694,CHP=B3B7B4B8B5B2B6,V
WER416B TOTAL OF 71,844 EXCP'S ISSUED FOR SORTWORKS
WER487I FILESIZE 1,159,760,680 BYTES
WER052I END SYNCSORT - U005506T,PS040,,DIAG=CA00,414C,E284,006E,827A,6C
WER052I DIAG1=A000,6253,88AC,0144,E852,4CCB,0AE8,8460
WER052I DIAG2=A800,625D,8084,014C,E07A,4CE3,02C8,AE60

Result:

The job executed successfully but output file is empty.
Back to top
View user's profile Send private message

cvishu

Active User


Joined: 31 Jul 2007
Posts: 136
Location: india

PostPosted: Thu Nov 04, 2010 12:37 pm    Post subject:
Reply with quote

Just a suggestion , havnt tried myself.. try removing the type=v and adjust the joinkeys by 4 bytes and see if its working
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Incorrect output when trying to add n... monica1 PL/I & Assembler 10 Fri Jan 13, 2017 5:02 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts Underlying DB2 VSAM LDS - SMF recording vasanthz All Other Mainframe Topics 6 Thu Jan 05, 2017 4:20 am
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us