I want the Sort to compare the same Accout and write only the AX type record for the same account , if AX is not present for a account it has to write other type.
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
Posted: Fri May 09, 2008 7:34 am Post subject:
Well, you should have posted in the Utilitites section (subtitled: DFSORT/ICEMAN....) BUT do not go and re-post. Your query will be found here.
Ypu will be required to provide other info - LRECL, RECFM, can your input have duplicates - if so show an example not only of the input but the output. If you read these fora regularly you would know these things. _________________ Utility and Program control cards are NOT, repeat NOT, JCL.
The input file is sequential and it can have duplicates , Where Account is not only the key. I need to Compare the same account number and then write the record with AX to a extract.
RECFM is VB, LREC = 2000,
Both Account number and type are present for all records in the file in the same Position.
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
Posted: Fri May 09, 2008 9:22 am Post subject:
Can you have multiple AX records for an account? If so, which AX record is to be written? What column is the account number in? Is it Zoned Decimal (i.e. eye readable)? What column is AX in? Whoever answers this for you will really like to see an example, similar to that in your first post, of the input file, with duplicates, and the expected output file. _________________ Utility and Program control cards are NOT, repeat NOT, JCL.
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
Posted: Mon May 12, 2008 9:20 am Post subject:
Well, I just got a little confused here - your first post says that if an AX is available then select that otherwise select the A2 record. Your last post says select the A1 record if an AX is not present. Can you please clarify the criteria for selecting another record when a type of AX is not available?
Also, can we assume that the Account is bytes 1-5 of the record and Type is bytes 10 - 11 (5-9 & 14-15 when RDW is included)?
BTW - I won't be giving the solution as I do not know it and, although I have manuals, I do not have a mainframe to play with until I get a new job. _________________ Utility and Program control cards are NOT, repeat NOT, JCL.
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Mon May 12, 2008 10:04 am Post subject:
Rajkannan,
You're not getting an answer here because you haven't explained clearly what you want to do. If nobody can understand what you want to do, then nobody can provide a solution.
Start over and give an example of the records in your input file and what you expect for output. Explain the "rules" for getting from input to output based on your example. Give the RECFM and LRECL of the input file. Give the starting position, length and format of all relevant fields. _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
I was preparing a high level solution for requirement. Now i have a detail requirement . While I posted previous question I didn't have complete requirement.
The RECFM is FB, LRECL = 40
scenario 1:
Code:
ACCT TYPE FREQUENCY
11111 Z1 Q
11111 P8 M
11111 P9 M
11111 Z1R Q
11111 Z1C Q
I need to process ( write to another extract ) z1,z1r,z1c as they all belong to frequency q and I need to write p8 and ignore p9
scenario 2:
Code:
ACCT TYPE FREQUENCY
11111 Z1 M
11111 P8 Q
11111 P9 M
11111 Z1R Q
11111 Z1C Q
I need to process ( write to extract ) p8,z1r,z1c as they all belong to frequency q and aslo write z1 and ignore p9
scenario 3:
Code:
ACCT TYPE FREQUENCY
11111 Z1 M
11111 P8 Q
11111 P9 Q
11111 Z1R M
11111 Z1C M
I need to process (write to extract) z1,z1r,z1c as they all belong to frequency M and also write P8 and ignore p9
scenario 4:
Code:
ACCT TYPE FREQUENCY
11111 Z1 M
11111 P8 M
11111 P9 M
11111 Z1R M
11111 Z1C M
I need to process (write to extract) z1,z1r,z1c as they all belong to frequency M and ignore p8,p9
scenario 5:
Code:
ACCT TYPE FREQUENCY
11111 P8 M
11111 P9 M
I need to process ( write to extract ) P8, and ignore p9.
Requirement is
1. presence of type z1 for the same account along with p8,p9 with the same frequency then Z1 needs to be written along with z1r,z1c of same frequency ( Scenario 4)
2. presence of type z1 for the same account along with p8,p9 with the different frequency then z1r,z1c needs to be written with matching frequency of z1,p8,p9 ( Scenario 2,Scenario 1,Scenario 3)
3. if only p8 or p9 is present without z1r and z1c . P8 needs to written.
(Scenario 5)
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
Posted: Thu May 15, 2008 4:01 am Post subject:
Can we assume that ACCT starts in col 1 length 5 bytes, TYPE starts in col 7 length 3 bytes and FREQUENCY starts col 11 length 1 byte?
Z1 is always to be extracted, P8 is to be extracted if its frequency does not match that of Z1, Z1C and Z1R are to be extracted if their frequency matches that of Z1 or P8 or P9 and P9 is never extracted.?
Can the frequency be any other value e.g. D, W, Y?
Can duplicates of any TYPE exist within an account? _________________ Utility and Program control cards are NOT, repeat NOT, JCL.
Can we assume that ACCT starts in col 1 length 5 bytes, TYPE starts in col 7 length 3 bytes and FREQUENCY starts col 11 length 1 byte?
Yes
Z1 is always to be extracted, P8 is to be extracted if its frequency does not match that of Z1, Z1C and Z1R are to be extracted if their frequency matches that of Z1 or P8 or P9 and P9 is never extracted.?
Yes
Can the frequency be any other value e.g. D, W, Y?
No
Can duplicates of any TYPE exist within an account?
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum