View previous topic :: View next topic
|
Author |
Message |
ibmmainframesyntel
Active User
Joined: 26 Feb 2007 Posts: 126 Location: Chennai
|
|
|
|
pls go thr attachment..
Input file
Code: |
000001 A1 Filename Comparision>>>>>>>>>>>>>>>>>>>>>>>> Filename Reference>>>>>>
..........................XXXXXXXXXXXX
000002 F1 E1 C 00000002 E108000070300000000002190051653710001000011108000070300
000003 F1 E2 C 00000003 E208000070300000000004190051653710000000000004001600000
000004 F1 E3 C 00000004 E308000070300000000005190051653710000000700000000000000
000005 F1 E4 C 00000005 E40800007030000000000319005165371 MM000000000000000 00
000006 F1 E4 C 00000006 E49800009070000000000719005165372 MM000000000000000
..........................XXXXXXXXXXXX
000007 V1 E1 DKK-ACCT-TYPE-CD DI F 0052
000008 V1 E1 DKK-ACCT-TYPE-CD DI F 0052 00
000009 V1 E1 DKK-ACCT-TYPE-CD DI F 0052
000010 V1 E3 INF3-DSCNT-AMT DI F 0036 +00000000000000
000011 V1 E3 INF3-DSCNT-AMT DI F 0036
000012 V1 E1 DKK-ACCT-TYPE-CD DI F 0052 00
000013 V1 E1 DKK-ACCT-TYPE-CD DI F 0052
000014 F1 E2 R 00000033 E29000000036101235008002 420
000015 F1 E2 R 00000034 E29000000036101235008002 420
000016 V1 E3 INF3-DSCNT-AMT DI F 0036 +00000000000000
000017 V1 E3 INF3-DSCNT-AMT DI F 0036
000018 F1 E3 R 00000036 E3900000003600000011000000000000000+000000000001708+570 |
Output File
Code: |
000001 A1 Filename Comparision>>>>>>>>>>>>>>>>>>>>>>>> Filename Reference>>>>>>
..........................XXXXXXXXXXXX
000002 F1 E1 C 00000002 E108000070300000000002190051653710001000011108000070300
000003 F1 E4 C 00000006 E49800009070000000000719005165372 MM000000000000000
..........................XXXXXXXXXXXX
000004 V1 E1 DKK-ACCT-TYPE-CD DI F 0052
000005 V1 E1 DKK-ACCT-TYPE-CD DI F 0052 00
000006 V1 E1 DKK-ACCT-TYPE-CD DI F 0052
000007 V1 E3 INF3-DSCNT-AMT DI F 0036 +00000000000000
000008 V1 E3 INF3-DSCNT-AMT DI F 0036
000009 V1 E1 DKK-ACCT-TYPE-CD DI F 0052 00
000010 V1 E1 DKK-ACCT-TYPE-CD DI F 0052
000011 F1 E2 R 00000033 E29000000036101235008002 420
000012 F1 E2 R 00000034 E29000000036101235008002 420
000013 V1 E3 INF3-DSCNT-AMT DI F 0036 +00000000000000
000014 V1 E3 INF3-DSCNT-AMT DI F 0036
000015 F1 E3 R 00000036 E3900000003600000011000000000000000+000000000001708+570 |
In the above record,
From position 4-5,
?E1? is the main record of the individual customer
?E2?, ?E3?, ?E4?, ?E5?? is detail record of the customer corresponding to ?E1? key field
If main record of the customer present in the file,then no need of keeping the detail record.It has to delete.
Ex: If ?E1? present, ?E2?,?E3?,?E4? record has to be deleted.
If only detail record present,then it has to to be keep has it is?.
Ex: If ?E2?, ?E3?,, ?E4? is present without ?E1?,
It should not be deleted.
Thank you |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Hi there,
Assume you have more than one detailed record present (i.e., E2, E3 or E3, E4 or all E2 to E5 etc....) without main (E1) record. Then what do you want to do? i.e., you want to delete the records keeping one occurence of each key or want to retain all the available detailed records? |
|
Back to top |
|
|
ibmmainframesyntel
Active User
Joined: 26 Feb 2007 Posts: 126 Location: Chennai
|
|
|
|
IF 'E1' IS NOT AVAILABLE...
Only 'E2','E3',etc....IS AVALILABLE...
THEN NO NEED TO DELETE ANY RECORD...HAS TO RETAIN AS IT IS..
If 'E1','E2',etc....PRESENT.........ONLY 'E1' HAS TO BE RETAIN..REMAINING 'E2',E3',etc...HAS TO BE DELETED...
THANK YOU |
|
Back to top |
|
|
ibmmainframesyntel
Active User
Joined: 26 Feb 2007 Posts: 126 Location: Chennai
|
|
|
|
Hi,
Please any one give a solution...its very urgent.
Frank where r u?
Expecting your reply.
Thank you |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
I tend not to look at this kind of complicated situation if it's not in the DFSORT Forum since I do actually have my own work to do.
Do you have DFSORT? If so, why didn't you post in the DFSORT Forum? |
|
Back to top |
|
|
ibmmainframesyntel
Active User
Joined: 26 Feb 2007 Posts: 126 Location: Chennai
|
|
|
|
shall i post once again in DFSORT Forum?
tell me i will post it again.
I think i can't post the same post twice in Forum.
It will become duplicate. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
To get the help you want, you need to reply to the questions presented to you.
From Frank:
Quote: |
Do you have DFSORT? |
If you have DFSORT, we can move your topic to the DFSORT forum. If you have some other sort product (Syncsort, CA-Sort, etc) your topic would not belong in the DFSORT forum.
And, no, you should not repost - this topic can be relocated once you provide the info. |
|
Back to top |
|
|
ibmmainframesyntel
Active User
Joined: 26 Feb 2007 Posts: 126 Location: Chennai
|
|
|
|
Yes.we having DFSORT utility.
you can give a solution using DFSORT.
Thank you |
|
Back to top |
|
|
Alain Benveniste
New User
Joined: 14 Feb 2005 Posts: 88
|
|
|
|
ibmmainframesyntel,
How many Ex you can have for a main record ?
Alain |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Hi there,
How many E1 records are you expecting? If the number of records are well within range of include/omit condition, try the following (this I have not tested, but may help you) -
(1) First extract all the E1 records only into temp file.
(2) Using this file, dynamically create a control card for omitting E2 or E3 etc.... records.
OMIT COND=((YOUR 1st KEY,AND,
E2 record,OR,
E3 record......),OR,
(YOUR 2nd KEY,AND,
E2 record,OR,
E3 record......),OR,.....)
(3) Apply the above dynamic control card against your file. |
|
Back to top |
|
|
ibmmainframesyntel
Active User
Joined: 26 Feb 2007 Posts: 126 Location: Chennai
|
|
|
|
Number of Ex records is not constant.
One set of E1,E2,..etc are the details of one customer.
Like that millions of customer are available.
It can't predictable. |
|
Back to top |
|
|
ibmmainframesyntel
Active User
Joined: 26 Feb 2007 Posts: 126 Location: Chennai
|
|
|
|
Hi murali,
Number of E1 records are more.
It contains millions of records.
so above JCL will not give the exact solution.
If I know the number of E1 record,then the above JCl will give the required solutuons
Thank you |
|
Back to top |
|
|
ibmmainframesyntel
Active User
Joined: 26 Feb 2007 Posts: 126 Location: Chennai
|
|
|
|
Hi murali,
If it is possible,tell meknow hoe to implement the JCL |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
I assume that XXXXXXXXXXXX indicates the customer number.
You seem to have two types of records. First type with a customer number like this:
Code: |
000002 F1 E1 C 00000002 E108000070300000000002190051653710001000011108000070300
000003 F1 E2 C 00000003 E208000070300000000004190051653710000000000004001600000
|
and second type without a customer number like this:
Code: |
000006 V1 E1 DKK-ACCT-TYPE-CD DI F 0052
000007 V1 E3 INF3-DSCNT-AMT DI F 0036 +00000000000000
000008 V1 E3 INF3-DSCNT-AMT DI F 0036
|
It appears that the first type of records (with a customer number) are eligible for deletion, whereas the second type of records (without a customer number) are not eligible for deletion - is that true?
The two types of records makes a solution difficult.
The first type of records have the En field twice, whereas the second type of records have the En field once - is that true?
Can I use the second En field to identify the records that are eligible for deletion and to know if they are E1, E2, E3, etc? |
|
Back to top |
|
|
ibmmainframesyntel
Active User
Joined: 26 Feb 2007 Posts: 126 Location: Chennai
|
|
|
|
consider the first type of record.
The record having the customer number (ie) record starts with 'F1' from
1-2 position, not 'V1'
'V1' type of record from 1-2 position has to be retain as it is.
And in the record
F1 E1 C 00000002 E108000070300000000002....
consider first 'E1' for identifying the record (ie) from the position 4-5
Thank you |
|
Back to top |
|
|
ibmmainframesyntel
Active User
Joined: 26 Feb 2007 Posts: 126 Location: Chennai
|
|
|
|
Inn the record
F1 E1 C 00000002 E108000070300000000002....
Don't consider the 'E1' which is in the position 18-19
Thank you |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Here's a DFSORT/ICETOOL job that will do what you asked for. I assumed your input file has RECFM=FB and LRECL=80, but the job can be changed appropriately for other attributes.
Code: |
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN= ... input file (FB/80)
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//OUT DD DSN=... output file (FB/80)
//TOOLIN DD *
SPLICE FROM(IN) TO(T1) ON(20,12,CH) KEEPBASE KEEPNODUPS -
WITHALL WITH(1,89) USING(CTL1)
SORT FROM(T1) TO(OUT) USING(CTL2)
/*
//CTL1CNTL DD *
INREC IFTHEN=(WHEN=INIT,OVERLAY=(81:SEQNUM,8,ZD)),
IFTHEN=(WHEN=(1,5,CH,EQ,C'F1 E1'),OVERLAY=(89:C'BB')),
IFTHEN=(WHEN=NONE,OVERLAY=(89:C'VV'))
OUTFIL FNAMES=T1,OMIT=(89,2,CH,EQ,C'VB')
/*
//CTL2CNTL DD *
SORT FIELDS=(81,8,ZD,A)
OUTREC BUILD=(1,80)
/*
|
|
|
Back to top |
|
|
ibmmainframesyntel
Active User
Joined: 26 Feb 2007 Posts: 126 Location: Chennai
|
|
|
|
Hi frank,
yes i got it and i understood the complete JCL.
Thank you |
|
Back to top |
|
|
|