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
 

 

Simple Splice JCL to get matched records - Need help

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
vijikesavan

Active User


Joined: 04 Oct 2006
Posts: 118
Location: NJ, USA

PostPosted: Sat Apr 14, 2007 12:41 am    Post subject: Simple Splice JCL to get matched records - Need help
Reply with quote

Hi,
I need to to extract the following from 2 files of same record length.
1) Matched records
2) Records only from file1
3) Records only from file2

I tried the Jcl but getting error:
Code:
ICE027A 9 END OF F1ONLY   FIELD BEYOND MAXIMUM RECORD LENGTH

All the files are FB.

the JCL is given below. pls help
Code:
//IN1 DD *                                         
AAAA 1111 9876 R                                   
BBBB 2222 9876 G                                   
CCCC 3333 8976 T                                   
DDDD 4444 7654 H                                   
/*                                                 
//IN2 DD *                                         
AAAA 1111 9876 R                                   
BBBB 2222 9876 G                                   
WWWW 5555 8976 W                                   
DDDD 4444 7654 H                                   
/*                                                 
//T1 DD DSN=&&T1,UNIT=PRIME,SPACE=(CYL,(1,1),RLSE),
//       DISP=(MOD,PASS)                           
//F1ONLY DD SYSOUT=*                                           
//F2ONLY DD SYSOUT=*                                           
//DUPL DD   SYSOUT=*                                           
//*                                                           
//TOOLIN DD *                                                 
COPY FROM(IN1) TO(T1) USING(CTL1)                             
COPY FROM(IN2) TO(T1) USING(CTL2)                             
SPLICE FROM(T1) TO(DUPL) ON(1,4,CH) -                         
  WITH(1,82) KEEPNODUPS USING(CTL3)                           
/*                                                             
//CTL1CNTL DD *                                               
  INREC OVERLAY=(81:C'BB')                                     
/*                                                             
//CTL2CNTL DD *                                               
  INREC OVERLAY=(81:C'VV')                                     
/*                                                             
//CTL3CNTL DD *                                               
  OUTFIL FNAMES=F1ONLY,INCLUDE=(81,2,CH,EQ,C'BB'),BUILD=(1,80)
  OUTFIL FNAMES=F2ONLY,INCLUDE=(81,2,CH,EQ,C'VV'),BUILD=(1,80)
/*                                                             
//


I know I am doing some simple mistake, but not able to figure out what it is. pls help.
Thanks in advance,
Viji
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Sat Apr 14, 2007 1:07 am    Post subject:
Reply with quote

Well, I see a couple of problems with your job.

1) You're using WITH(1,82) instead of WITH(1,81).

2) You need an OUTFIL statement for DUPL:

Code:

//CTL3CNTL DD *                                               
  OUTFIL FNAMES=DUPL,INCLUDE=(81,2,CH,EQ,C'VB'),BUILD=(1,80)   
  OUTFIL FNAMES=F1ONLY,INCLUDE=(81,2,CH,EQ,C'BB'),BUILD=(1,80)
  OUTFIL FNAMES=F2ONLY,INCLUDE=(81,2,CH,EQ,C'VV'),BUILD=(1,80)


But I think the actual cause of your problem is that your site has changed the IBM shipped default of SOLRF=YES to SOLRF=NO (you can check that by doing an ICETOOL DEFAULTS run). That's really not a good idea.

If that's the case, then adding the following to your job should fix things up:

Code:

//DFSPARM DD *
  OPTION SOLRF
/*
Back to top
View user's profile Send private message
Sagar Mane

New User


Joined: 12 Feb 2007
Posts: 3
Location: Mumbai

PostPosted: Wed Apr 18, 2007 2:56 pm    Post subject: Splice JCL to get matched records
Reply with quote

Hi Frank,

I need your help on some similar problem that I am facing. Though I can't send the input file record as its too big. My requirement is as follows.
Note: I have added the seperator just to seperate the data. There is no seperator in the actual file.
Input1:
100~ABCDE~12345~01-01-2007
200~ABCDE~64789~01-01-2005
800~ABCDE~11223~01-01-2006

Input2:
100~ABCDE~12345~xxxx~01-01-1975
800~ABCDE~64789~xxxx~01-01-1944
300~ABCDE~11223~xxxx~01-12-1954

Now I want to merge these two files in such a way that the output file will look like this:
ABCDE1234501-01-200701-01-1975
ABCDE6478901-01-200501-01-1944
ABCDE1122301-01-200601-12-1954

Here the last field i.e. the Birth Date from input file2 is merged to input file1. The key for both the input files is 5 chars from 4th position + 5chars from 9th position. eg. Name: ABCDE + Number: 12345.
In my Jcl I have used the Control Card for Input1 as

OUTREC FIELDS=(1:4,10,11:14,10,21:10x).

and for Input2
OUTREC FIELDS=(1:4,10,21:18:10).

But this is not working. Please let me know if any solution
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed Apr 18, 2007 8:53 pm    Post subject:
Reply with quote

You should have started a new Topic.

You can use the technique shown in the "Join fields from two files on a key" Smart DFSORT Trick at:

http://www.ibm.com/servers/storage/support/software/sort/mvs/tricks/

If you need more specific help, tell me the RECFM and LRECL of each input file, and what you want for output in cases where input file1 has a record without a match in input file2, and where input file2 has a record without a match in input file1.
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am
No new posts Inserting records based on conditions vickey_dw DFSORT/ICETOOL 9 Wed Feb 22, 2017 1:33 pm
No new posts To Merge mutliple records into a sing... anandgbe DFSORT/ICETOOL 6 Wed Feb 22, 2017 8:49 am


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