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

Compare and merging with VSAM


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
bbharathiraj
Warnings : 1

New User


Joined: 26 Oct 2006
Posts: 50
Location: Chennai

PostPosted: Mon Aug 30, 2010 4:06 pm
Reply with quote

below is my requirement.

I/P FILE1 (flat file -FB)

COUNTRY-CODE PIC 9(3)
Current CUSTOM NMBR - X(19)

I/P FILE 2 (Total Length - 1020, VSAM file: key 1 to 26 - first 3 fields from below list)

COUNTRY CODE POS (1) length (PIC 9(3)
Current CUSTOM NMBR - POS (4) length X(19)
seq-nmbr pos (23) length 9(4) - Value is 0001
State-code - pos(404) length 9(3)
New-customer-nmbr pos(407) length x(19)

o/p:

I am trying to create the o/p file with the below format
ONLY if Current CUSTOM NMBR from File 1 is match with File2 and State-code = 780 and New-customer-nmbr should NOT BE SPACES.


o/p file: Total length 400 and FB. Other position can be spaces. Only below fields are important

rwenrl IND - POS (1) (T -constant)
Current CUSTOM NMBR POS(2) length Length X(19) (from file 1)
COUNTRY CODE pos(85) length 9(3) (from I/P file 1)
State-code pos(88) length 9(3) (from file 2)
New-customer-nmbr pos (91) length X(19) (from file 2)
Back to top
View user's profile Send private message
sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 577
Location: USA

PostPosted: Mon Aug 30, 2010 4:47 pm
Reply with quote

bbharathiraj,

What is the LRECL for file1? Could you have duplicates in file1 and/or file2 for the cust. number?Why do you say you want state code from file2 if it is always going to be a constant value of 780?

Please provide your DFSort function level.

Thanks,
Back to top
View user's profile Send private message
bbharathiraj
Warnings : 1

New User


Joined: 26 Oct 2006
Posts: 50
Location: Chennai

PostPosted: Mon Aug 30, 2010 6:16 pm
Reply with quote

My LrecL for file1 is 22 byte. I need to extract only state code is 780.I/p file 2 is also having other state code as well
Back to top
View user's profile Send private message
sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 577
Location: USA

PostPosted: Mon Aug 30, 2010 6:32 pm
Reply with quote

bbharathiraj,
You still didn't answer earlier question on duplicates. Could you have duplicates in file1 and/or file2 for the cust. number?

Thanks,
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: Mon Aug 30, 2010 7:57 pm
Reply with quote

Hello,

You need to post same sample input data and the output you want when that sample input is processed. You need to explain any rules associated with this process. If there can be duplicates, show this in the sample data as well as how duplicates should be dealt with.
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
No new posts CVDA value for RRDS VSAM dataset. CICS 2
No new posts Compare two files with a key and writ... SYNCSORT 3
Search our Forums:

Back to Top