View previous topic :: View next topic
|
Author |
Message |
SumeetDuseja
New User
Joined: 12 Jul 2009 Posts: 9 Location: Pune
|
|
|
|
There are 3 files which are as below
FILE 1 (DAILY ACTIVITY VSAM FILE)
POLICY NO(1-13) DATE(14-21) ID (22-32)
------------------------------------------------------
956074121022A20091214IMDEC0S00V6
956074121022A20091214MDC000S00V7
956074121022A20091214MPD000S00V3
111111111111A20091214IMDEC0S00V6
111111111111A20091214MDC000S00V7
111111111111A20091214MPD000S00V3
222222222222A20091214IMDEC0S00V6
222222222222A20091214MDC000S00V7
222222222222A20091214MPD000S00V3
333333333333A20091214IMDEC0S00V6
333333333333A20091214MDC000S00V7
333333333333A20091214MPD000S00V3
FILE 2 (LATEST STATUS QSAM file) (LRECL=500 , FORMAT=FB)
POLICY NO(1-13) DATE(14-21) ID (22-32)
------------------------------------------------------
956074121022A20091214IMDEC0S00V6
956074121022A20091214MDC000S00V7
956074121022A20091214MPD000S00V3
111111111111A20091214IMDEC0S00V6
111111111111A20091214MDC000S00V7
111111111111A20091214MPD000S00V3
FILE 3 (HISTORY VSAM FILE) :
POLICY NO(1-13) DATE(14-21) ID (22-32)
-------------------------------------------------------
956074121022A20091214IMDEC0S00V6
956074121022A20091214MDC000S00V7
956074121022A20091214MPD000S00V3
111111111111A20091214IMDEC0S00V6
111111111111A20091214MDC000S00V7
111111111111A20091214MPD000S00V3
222222222222A20091214IMDEC0S00V6
222222222222A20091214MDC000S00V7
222222222222A20091214MPD000S00V3
333333333333A20091214IMDEC0S00V6
333333333333A20091214MDC000S00V7
333333333333A20091214MPD000S00V3
I am having following requirement
1. Read all the record from file 2 one by one and find the matching record in file 3 , copy this file 3 record in
back up qsam file (say file 4)
2. Repro all the record of file 2 in file 3
3 Delete all record from FILE 1 which are present in FILE 2 |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Please show the expected output for your example. Explain the rules for getting from input to output in terms of the example (your explanation of the rules is not clear - it isn't clear how many output files you want or what should be in them). |
|
Back to top |
|
|
anandinmainframe
Active User
Joined: 31 May 2007 Posts: 171 Location: India
|
|
|
|
Sumeet,
You want this to be done in SORT? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
You want this to be done in SORT? |
Yes. |
|
Back to top |
|
|
SumeetDuseja
New User
Joined: 12 Jul 2009 Posts: 9 Location: Pune
|
|
|
|
Hi Frank
My main concentration is on requirement 2 & 3.
Currently FILE-1, FILE-2, FILE-3 are already created.
Key filed of all the 3 files start from position 1 to position 32
Rules for requirement 2 --
Read all the record from File 2 (qsam file) and repro it into FILE 3
Rules for requirement 3
Read record from file 2 using key filed, try to find out match record in FILE 1. if match found DELETE that record from FILE1.
Hope this will help you to understand the scenario.
Thanks in advance....!!!!!
[/u] |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Since you insist on describing your rules programmatically, I'd suggest you write a program to implement them.
If you want a DFSORT solution, then you need to give me what I asked for. Again:
Quote: |
Please show the expected output for your example. Explain the rules for getting from input to output in terms of the example (your explanation of the rules is not clear - it isn't clear how many output files you want or what should be in them). |
If you can't give me what I asked for, then I can't help you. |
|
Back to top |
|
|
SumeetDuseja
New User
Joined: 12 Jul 2009 Posts: 9 Location: Pune
|
|
|
|
Hi Franks
My expected result for reqiurement 3 are as below
FILE 1 (DAILY ACTIVITY VSAM FILE)
POLICY NO(1-13) DATE(14-21) ID (22-32)
------------------------------------------------------
222222222222A20091214IMDEC0S00V6
222222222222A20091214MDC000S00V7
222222222222A20091214MPD000S00V3
333333333333A20091214IMDEC0S00V6
333333333333A20091214MDC000S00V7
333333333333A20091214MPD000S00V3
FILE 2 (LATEST STATUS QSAM file) (LRECL=500 , FORMAT=FB)
POLICY NO(1-13) DATE(14-21) ID (22-32)
------------------------------------------------------
956074121022A20091214IMDEC0S00V6
956074121022A20091214MDC000S00V7
956074121022A20091214MPD000S00V3
111111111111A20091214IMDEC0S00V6
111111111111A20091214MDC000S00V7
111111111111A20091214MPD000S00V3
now Here you can see that whatever the policy records present in FILE2 same records are not present in FILE 1 |
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
SumeetDuseja,
What is the LRECL and RECFM of the FILE1 VSAM file? Also you mention that you need to delete the matching records from FILE1? Since it is a VSAM File , is it defined as REUSE? Is it a KSDS file?
The same goes for FILE 3 which is also a VSAM file. You are adding records to it. Is it a KSDS? If so what is the key for the file? Run a Listcat on both vsam clusters and check if they are indeed defined as REUSE. |
|
Back to top |
|
|
SumeetDuseja
New User
Joined: 12 Jul 2009 Posts: 9 Location: Pune
|
|
|
|
Hi Skolusu
Specification for FILE 1
Data Component Information:
Device type: 3390
Organization: KSDS
KSDS key length: 32
KSDS key location: 0
Average record size: 500
Maximum record size: 500
Allocated Space: Unit Primary Secondary
Data: CYLINDERS 40 5
Index: TRACKS 20 3
Current Allocation Options:
Load option: SPEED
Write check: NO
Buffer space: 12288
Erase on delete: NO
Imbedded index: NO
Replicated index: NO
Reuse option: NO
Share option: 2-3
Spanned records: NO
Specification for FILE 3 are exactly similar to File 1
Note : I have fethed this information using File AID
Kindly let me know if I missed anything to provide you. |
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
SumeetDuseja,
The files are defined with REUSE=NO , so you cannot Add/delete records from it. You are better off writing a program |
|
Back to top |
|
|
|