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
 

 

How to achive this requirement...

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: How to achive this requirement...
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    Post subject: Reply to: How to achive this requirement...
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: 2284
Location: @my desk

PostPosted: Fri Mar 13, 2009 9:44 pm    Post subject:
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

Senior Member


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

PostPosted: Sat Mar 14, 2009 10:56 am    Post subject:
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

Site Director


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

PostPosted: Sat Mar 14, 2009 7:11 pm    Post subject: Reply to: How to achive this requirement...
Reply with quote

Hi Anuj,

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

Senior Member


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

PostPosted: Sat Mar 14, 2009 7:14 pm    Post subject: Re: Reply to: How to achive this requirement...
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

Site Director


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

PostPosted: Sat Mar 14, 2009 7:45 pm    Post subject:
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    Post subject: Reply to: How to achive this requirement...
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: 2284
Location: @my desk

PostPosted: Mon Mar 16, 2009 5:51 pm    Post subject:
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: 2284
Location: @my desk

PostPosted: Mon Mar 16, 2009 10:34 pm    Post subject:
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    Post subject:
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    Post subject: Reply to: How to achive this requirement...
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: 500
Location: USA

PostPosted: Tue Mar 17, 2009 11:01 pm    Post subject:
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    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 Need inputs on Space requirement and... ashek15 IMS DB/DC 0 Sat Apr 01, 2017 8:26 am
No new posts SORT requirement sjiraga COBOL Programming 6 Thu Mar 09, 2017 9:11 pm
This topic is locked: you cannot edit posts or make replies. Mainframe Developer requirement in Ku... capricorn Mainframe Jobs 0 Sun Oct 23, 2016 3:49 pm
No new posts Cards mainframe developer requirement... capricorn Mainframe Jobs 0 Sun Sep 11, 2016 9:57 am
This topic is locked: you cannot edit posts or make replies. Urgent Requirement in CTS Chennai. Mahi_e Mainframe Jobs 0 Wed Feb 17, 2016 3:52 pm


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