Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Use splice operator for two files

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

New User


Joined: 19 Apr 2007
Posts: 9
Location: Richmond

PostPosted: Mon Mar 17, 2008 3:54 pm    Post subject: Use splice operator for two files
Reply with quote

Hi, i would want to use splice operator for two files.
file 1 has loan numbers with record length of 10 bites
file 2 has a record key of 98 bites which also contains the loan number.

file 1
0000001
0000002
0000003

file 2
abcdefgh.........0000001xyz....
(the length of the record is 98 bites as told earlier)
.
.
.

I want to check if there are any ocurance of loan numbers(File 1) in File 2. If the loan number is present, i would want to get rid of that particular record, matching the loan number.

regards
Anant
Back to top
View user's profile Send private message

krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Mon Mar 17, 2008 6:01 pm    Post subject:
Reply with quote

ant1271
How should the o/p look like? Should the o/p have the format of FIle-1 or File-2? OR else something diff then File-1 and FIle-2?
Back to top
View user's profile Send private message
ant1271

New User


Joined: 19 Apr 2007
Posts: 9
Location: Richmond

PostPosted: Mon Mar 17, 2008 6:08 pm    Post subject:
Reply with quote

The output will be same as file 2. If file 2 has 1 million records and file 1 has 10,000, then the file 2 should have lesser 10,000 records.
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: Mon Mar 17, 2008 8:42 pm    Post subject:
Reply with quote

What is the RECFM and LRECL of the input files?

What is the starting position of the loan number in input file2?

Can input file2 have duplicate loan numbers within it (e.g. two 0000001 records?).

Is there some reason you have to use SPLICE? SELECT would probably be a better choice if file2 does NOT have duplicate loan numbers within it.
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Mon Mar 17, 2008 8:53 pm    Post subject:
Reply with quote

Code:
//STEP001  EXEC PGM=ICETOOL
//TOOLMSG  DD SYSOUT=*     
//DFSMSG   DD SYSOUT=*     
//IN1      DD *           
0000001                   
0000002                   
0000003                   
/*                         
//IN2      DD *           
ASDAD..0000001             
AASDF..0000002             
AASDF..0000003             
SDFAD..0000004             
ASDFG..0000005             
/*
//TMP1     DD DSN=&&TEMP1,DISP=(MOD,PASS),SPACE=(TRK,(5,5)),UNIT=SYSDA
//OUT      DD SYSOUT=*                                               
//TOOLIN   DD *                                                       
 COPY FROM(IN2)  TO(TMP1) USING(CP01)                                 
 COPY FROM(IN1)  TO(TMP1) USING(CP02)                                 
 SPLICE FROM(TMP1) TO(OUT) ON(8,7,CH) WITH(82,1) -                   
                            USING(CP03) KEEPNODUPS                   
/*                                                                   
//CP01CNTL DD   *                                                     
  OUTREC OVERLAY=(81:C'11')                                           
/*                                                                   
//CP02CNTL DD   *                                                     
  OUTREC OVERLAY=(8:1,7,81:C'22')                                     
/*                                                                   
//CP03CNTL DD   *                                                     
  OUTFIL FNAMES=OUT,INCLUDE=(81,2,CH,NE,C'12'),BUILD=(1,80)           
/*                                                                   


OUT contains
Code:
SDFAD..0000004
ASDFG..0000005


Hope this is what you wanted!
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: Mon Mar 17, 2008 9:02 pm    Post subject:
Reply with quote

As I said, SELECT would be a better choice for that particular example, but I'll wait for Anant's answers to my questions before commenting further.
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Tue Mar 18, 2008 6:27 pm    Post subject:
Reply with quote

Ohh i hadnt seen this quote from you Frank....
Quote:
Is there some reason you have to use SPLICE? SELECT would probably be a better choice if file2 does NOT have duplicate loan numbers within it.
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 Compare VSAM files using DFSORT pshongal DFSORT/ICETOOL 5 Thu Nov 23, 2017 10:24 am
No new posts Split files upto certain limit based ... bubbu75 DFSORT/ICETOOL 5 Tue Nov 14, 2017 11:11 pm
No new posts Copy selected columns from 2 input fi... Poha Eater DFSORT/ICETOOL 3 Thu Nov 02, 2017 3:43 pm
No new posts Finding difference between two PS fil... Vignesh Sid SYNCSORT 5 Mon Oct 30, 2017 1:13 pm
No new posts NDM 300 files from mainframe to linux shreya19 All Other Mainframe Topics 2 Thu Oct 26, 2017 11:40 am

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