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

How to achive this requirement...


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

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Fri Mar 13, 2009 6:38 pm
Reply with quote

Hi,

I have to compare two files based on SSN. I want the first file contents to o/p files if the SSN is matched with II file.
I file: Recfm: 1061
II file: Recfm: 126

And the difficulty thing is in first file the SSN is defined as PIC S9(09) COMP and in II file SSN is defined as PIC 9(9).

I know how to do if they are of same format.

Code:

//T1       DD DSN=&&T1,DISP=(MOD,PASS),SPACE=(CYL,(1,1),RLSE)         
//OUT      DD SYSOUT=*                                                 
//TOOLIN   DD *                                                       
  COPY FROM(IN2) USING(CTL1)                                           
  COPY FROM(IN1) USING(CTL2)                                           
  SPLICE FROM(T1) TO(OUT) ON(1,9,CH) WITHALL WITH(01,1061) USING(CTL3)
//CTL1CNTL DD *                                                       
  OUTFIL FNAMES=T1,OVERLAY=(1062:1,9)                                 
//CTL2CNTL DD *                                                       
  OUTFIL FNAMES=T1,OVERLAY=(1062:9X)                                   
//CTL3CNTL DD *                                                       
  OUTFIL FNAMES=OUT,BUILD=(01,1061),                                   
  INCLUDE=(1,9,CH,EQ,1062,9,CH)                                       
/*                                                                     


R KARTHIK
Back to top
View user's profile Send private message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Fri Mar 13, 2009 6:41 pm
Reply with quote

I forgot to mention the key field position,

In I file (1,4) --- PIC S9(09) COMP
In II file (1,9) --- PIC 9(09).

Regards
R KARTHIK
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Fri Mar 13, 2009 9:44 pm
Reply with quote

Karthik,

If I remember correctly you had SyncSort. Has your shop migrated to DFSORT ?
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Sat Mar 14, 2009 10:56 am
Reply with quote

Hi,
Quote:
files based on SSN.
Just out of curiosity, please let me know what does SSN refer to here?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat Mar 14, 2009 7:11 pm
Reply with quote

Hi Anuj,

Most likely Social Security Number. . .
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Sat Mar 14, 2009 7:14 pm
Reply with quote

Hi Dick,
dick scherrer wrote:
Most likely Social Security Number. . .
as He said:
Quote:
SSN is defined as PIC S9(09) COMP
so I doubt this. . .
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat Mar 14, 2009 7:45 pm
Reply with quote

Hi Anuj,

Quote:
Quote:
SSN is defined as PIC S9(09) COMP
so I doubt this. . .

What doubt might this cause?

Lots of old systems defined social number as 9(9) comp or 9(9) comp-3 to save space. . . Lots of innocent people also incorrectly believed that social security number would always be unique (many used ssn as the primary/unique key to "people" data (like payroll, hr, retirement, benefits, etc)).
Back to top
View user's profile Send private message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Mon Mar 16, 2009 11:41 am
Reply with quote

Hi,

Ya SSN is social security number. I want to compare based on that and want the first file contents to o/p files if the SSN is matched with II file.

Field positions are,
In I file (1,4) --- PIC S9(09) COMP
In II file (1,9) --- PIC 9(09).

Kindly any one help me to achive this requirement.

Regards
R KARTHIK
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Mon Mar 16, 2009 5:51 pm
Reply with quote

Mods,

A PM from the OP says he uses SyncSort. I think this topic can be moved to the JCL forum.
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Mon Mar 16, 2009 10:34 pm
Reply with quote

karthikr44,

AFAIK, Even in SPLICE, you need the keys to be in the same format. Since you already have SyncSort you can achieve this easily using a SyncSort JOIN application following a reformat step to make the keys in the same format. And you dont need as many passes of data as you do in the SPLICE job mentioned above.
Back to top
View user's profile Send private message
bipinpeter

Active User


Joined: 18 Jun 2007
Posts: 213
Location: Cochin/Kerala/India

PostPosted: Tue Mar 17, 2009 10:45 am
Reply with quote

Hi karthik,
I dont know this is the correct way for this solution.My suggestion is that you can acheive this by two sort steps.May be by a single ICETOOL step,i'm not familiar with ICETOOL.
My suggestion is that,
STEP1: convert the S9(09) COMP-3 to normal filed(like PIC 9(09))
STEP2: Compare the output from STEP1 and other file by the SORT join.

Guys please confirm can we do like this....

Regards,
Bipin Peter
Back to top
View user's profile Send private message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Tue Mar 17, 2009 9:06 pm
Reply with quote

Hi,

Any updates on this requirement to acheive...

Regards
R KARTHIK
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 496
Location: USA

PostPosted: Tue Mar 17, 2009 11:01 pm
Reply with quote

Bipin Peter has this logic correct. One of the key fields must be coverted to the other format, and then a SyncSort JOIN can be easily performed. The REFORMAT statement will then be:
Code:
REFORMAT FIELDS=(F1:1,1061)
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 Urgent requirement for MF (Exp - 4 to... Mainframe Jobs 0
No new posts Need inputs on Space requirement and... IMS DB/DC 0
No new posts SORT requirement COBOL Programming 6
This topic is locked: you cannot edit posts or make replies. Mainframe Developer requirement in Ku... Mainframe Jobs 0
No new posts Cards mainframe developer requirement... Mainframe Jobs 0
Search our Forums:

Back to Top