View previous topic :: View next topic
|
Author |
Message |
bbharathiraj Warnings : 1 New User
Joined: 26 Oct 2006 Posts: 50 Location: Chennai
|
|
|
|
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 |
|
|
sqlcode1
Active Member
Joined: 08 Apr 2010 Posts: 577 Location: USA
|
|
|
|
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 |
|
|
bbharathiraj Warnings : 1 New User
Joined: 26 Oct 2006 Posts: 50 Location: Chennai
|
|
|
|
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 |
|
|
sqlcode1
Active Member
Joined: 08 Apr 2010 Posts: 577 Location: USA
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
|