View previous topic :: View next topic
|
Author |
Message |
Indrajit_57 Warnings : 1 New User
Joined: 27 Jun 2006 Posts: 60
|
|
|
|
We have 2 diff date fields in 2 diff files.
1) A-date - in A file - pic 9(07) comp-3 , offset 100
2) B-date - in B file - pic 9(07) comp-3 , offset 200
Both A & B are fixed length VSAM files.
I want to extract those account which satisfies below condtion:
If A-date > B-date
extarct accts from A file into C-file
end-if |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Your post is not at all clear.
Please post sample data from both files (several records) and what the output should be. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
Please post sample data from both files (several records) and what the output should be. |
Include only relevant fields (e.g. account, date) in the examples.
And in addition to that, provide this information:
pic 9(07) comp-3 is a 4-byte PD field. What is the form of the date (e.g. P'yyyyddd')?
Give the starting position, length and format of all relevant fields.
What is the length of the records in each VSAM file?
Do you want to compare the dates for the same account number in each file, or do you want to compare the dates some other way? Show and explain what you want with the example. |
|
Back to top |
|
|
Indrajit_57 Warnings : 1 New User
Joined: 27 Jun 2006 Posts: 60
|
|
|
|
File-A
01 A-RECORD
05 A-ORG PIC X(03)
05 A-DATE PIC S9(07) COMP-3
FILE-B
01 B-RECORD
05 B-ORG PIC X(03)
05 B-ACCOUNT PIC X(19)
05 B-DATE PIC S9(07) COMP-3
Both date is in JULIAN FORMAT (YYYYDDD)
File A is control record file which contains only 2 fields, A-org and A-date.
There is no any account number present in this file.
File B is
now i want to extract all accounts from file B if it matches below condition:
If B-DATE > A-DATE
write B-record into OUTPUT file
end-if |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
As this is the DFSORT area of the forum, it would be better to show sample input and output data, show the attributes/displacements into the data of the relevant fields as well as mentioning lrecl/recfm for all files. |
|
Back to top |
|
|
|