IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

error while creating VB output using joinkeys


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rakesh17684

New User


Joined: 08 Oct 2006
Posts: 61
Location: San Diego

PostPosted: Thu Feb 05, 2009 9:42 am
Reply with quote

Hi,
I have 2 file
file1 - RECFM = VB,length = 172
file 2 - RECFM =FB,length =80
I need to compare this two files using a particular field which is present
at different position in both files and write the unmatching records of file
1 to output file(which should be of VB format and Length should be same file1)

Code:

//SORTNIN EXEC PGM=SORT
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SORTJNF1 DD DSN=FILE1,DISP=SHR (VB/172)
//SORTJNF2 DD DSN=FILE2,DISP=SHR  (VB/80)
//SORTOUT DD DSN=FILE.OUTPUT,
//           SPACE=(CYL,(10,10),RLSE),
//           DISP=(NEW,CATLG,CATLG),
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
   JOINKEYS FILES=F1,FIELDS=(0023,2,A)
   JOINKEYS FILES=F2,FIELDS=(1,2,A)
   JOIN UNPAIRED,F1,ONLY
   REFORMAT FIELDS=(F1:1,172)
   SORT FIELDS=COPY
/*

when i execute this i get the output file of RECFM = FB ,then i modified
the jcl as below
Code:

//SORTNIN EXEC PGM=SORT
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SORTJNF1 DD DSN=FILE1,DISP=SHR (VB/172)
//SORTJNF2 DD DSN=FILE2,DISP=SHR (FB/80)
//SORTOUT DD DSN=FILE.OUTPUT,
//           SPACE=(CYL,(10,10),RLSE),
//           DISP=(NEW,CATLG,CATLG),
//           DCB=(RECFM=VB)
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
   JOINKEYS FILES=F1,FIELDS=(0023,2,A)
   JOINKEYS FILES=F2,FIELDS=(1,2,A)
   JOIN UNPAIRED,F1,ONLY
   REFORMAT FIELDS=(F1:1,172)
   SORT FIELDS=COPY
/*


But this gives me ABENDU0016 with following message when I try to execute it

-SORTOUT RECFM INCOMPATIBLE
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Feb 05, 2009 11:40 am
Reply with quote

And what does this
Quote:
SORTOUT RECFM INCOMPATIBLE
tells you, how about posting the SYSOUT messages?
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Thu Feb 05, 2009 11:41 am
Reply with quote

Rakesh,

The error message seems to suggest that you have used a VB file as SORTOUT where a different format was expected as per the control cards used. Can you post the unedited SYSOUT messages here?
Back to top
View user's profile Send private message
rakesh17684

New User


Joined: 08 Oct 2006
Posts: 61
Location: San Diego

PostPosted: Thu Feb 05, 2009 12:06 pm
Reply with quote

Hi,
PFB the sysout message
Code:

 SYSIN :                                                               
    SORT FIELDS=COPY                                                   
    JOINKEYS FILES=F1,FIELDS=(0023,2,A)                               
    JOINKEYS FILES=F2,FIELDS=(1,2,A)                                   
    JOIN UNPAIRED,F1,ONLY                                             
    REFORMAT FIELDS=(F1:1,0172)                                       
 WER276B  SYSDIAG= 844, 2630148, 2630148, 4212617                     
 WER164B  5,720K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,   
 WER164B     0 BYTES RESERVE REQUESTED, 1,000K BYTES USED             
 WER146B  20K BYTES OF EMERGENCY SPACE ALLOCATED                       
 WER481I  JOINKEYS REFORMAT RECORD LENGTH=  172, TYPE = F             
 WER202A  SORTOUT  RECFM INCOMPATIBLE                                 
 WER110I  SORTOUT  : RECFM=VB   ; LRECL=      ; BLKSIZE=               
 WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000                         
 WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE                         
 WER482I  JNF1 STATISTICS                                             
 WER483B  2,396K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,   
 WER483B     0 BYTES RESERVE REQUESTED, 1,000K BYTES USED             
 WER108I  SORTJNF1 : RECFM=VB   ; LRECL=   172; BLKSIZE= 27998         
 WER482I  JNF2 STATISTICS                                             
 WER483B  2,396K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,   
 WER483B     0 BYTES RESERVE REQUESTED, 1,000K BYTES USED             
 WER108I  SORTJNF2 : RECFM=FB   ; LRECL=    80; BLKSIZE=   800         
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Thu Feb 05, 2009 7:16 pm
Reply with quote

Try adding this to your sort card (untested).
Code:
OUTFIL FTOV,VLTRIM=C' '
Back to top
View user's profile Send private message
Ajay Baghel

Active User


Joined: 25 Apr 2007
Posts: 206
Location: Bangalore

PostPosted: Thu Feb 05, 2009 10:10 pm
Reply with quote

Hi Rakesh,

WER messages indicate that you are using Syncsort.
Try the below sort card:
Code:
   JOINKEYS FILES=F1,FIELDS=(0023,2,A)
   JOINKEYS FILES=F2,FIELDS=(1,2,A)
   JOIN UNPAIRED,F1,ONLY
   REFORMAT FIELDS=(F1:1,4,F1:5)
   SORT FIELDS=COPY
/*


This will take all the data bytes from the VB file starting from col 5 .


Thanks,
Ajay
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Fri Feb 06, 2009 10:27 am
Reply with quote

rakesh17684,

Or even you can omit your REFORMAT statement. Since you are specifying UNPAIRED,F1,ONLY, it should assume SORTJNF1 file attributes for your SORTOUT.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
Search our Forums:

Back to Top