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

Help required for implementing following scenario


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

New User


Joined: 12 Jul 2009
Posts: 9
Location: Pune

PostPosted: Wed Jan 20, 2010 12:33 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Jan 20, 2010 11:14 pm
Reply with 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).
Back to top
View user's profile Send private message
anandinmainframe

Active User


Joined: 31 May 2007
Posts: 171
Location: India

PostPosted: Thu Jan 21, 2010 7:01 pm
Reply with quote

Sumeet,
You want this to be done in SORT?
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: Thu Jan 21, 2010 9:48 pm
Reply with quote

Hello,

Quote:
You want this to be done in SORT?
Yes.
Back to top
View user's profile Send private message
SumeetDuseja

New User


Joined: 12 Jul 2009
Posts: 9
Location: Pune

PostPosted: Fri Jan 22, 2010 10:37 am
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Fri Jan 22, 2010 9:51 pm
Reply with quote

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
View user's profile Send private message
SumeetDuseja

New User


Joined: 12 Jul 2009
Posts: 9
Location: Pune

PostPosted: Mon Feb 01, 2010 7:21 pm
Reply with quote

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
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Mon Feb 01, 2010 9:58 pm
Reply with quote

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
View user's profile Send private message
SumeetDuseja

New User


Joined: 12 Jul 2009
Posts: 9
Location: Pune

PostPosted: Tue Feb 02, 2010 6:16 pm
Reply with quote

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
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Tue Feb 02, 2010 10:44 pm
Reply with quote

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
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 EMPTY file check scenario JCL & VSAM 6
No new posts Required Date Format in Include Sort ... DFSORT/ICETOOL 6
No new posts COMPUSET/XICS z/os document required All Other Mainframe Topics 1
No new posts Number of Packages required for stati... DB2 4
No new posts Receommendations required for adding ... JCL & VSAM 5
Search our Forums:

Back to Top