I have a IMS DB unload file which is a VB file of 163 bytes, depending upon the 51st byte which should not be P and the 79th byte which should not be T I am trying to extract the 11bytes out of the 29th position out of the file into a FB file of 80 bytes. I am using this control card but am not able to get the result
Also in the next step I would like to compare with another file of 80 bytes which again is a flat file and has the first 11 bytes. So I was thinking of merging the files and extracting the duplicates. Can all these be possible in one Icetool step?
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
Are you considering the VB file RDW in your position calculation? If not, your byte 51 will be byte 55 and your byte 79 will be byte 81 -- and byte 11 would be byte 15.
Also in the next step I would like to compare with another file of 80 bytes which again is a flat file and has the first 11 bytes. So I was thinking of merging the files and extracting the duplicates. Can all these be possible in one Icetool step?
Probably, but first you have to explain more clearly what you're trying to do.
Please show an example of the records in each input file (relevant fields only) and what you expect for output. Explain the "rules" for getting from input to output. Give the starting position, length and format of each relevant field. Give the RECFM and LRECL of the input files. If file1 can have duplicates within it, show that in your example. If file2 can have duplicates within it, show that in your example.
I have an IMS database extracted to a flat file of record format VB and record length 163. From this I need to extract out records depending on the following criterion
a) 55th position should not 'P'
b) 83rd position should not be 'T'
When this criterion is met I have to extract the account number of length 11 and at position 34 to a FB file of record length 80. This database unload will not have any duplicates (as in the account numbers).
The database unload file looks like this
Code:
BROWSE XX.XXXXX.UNLOAD Line 00000000 Col 001 080
Command ===> Scroll ===> CSR
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
********************************* Top of Data **********************************
....IXP07.00.F3YPREFIX LENGTH= 39 MAX ROOT KEY LENGTH= 11
........XXXXXX ..XXXXXXX ..1003804001910038040019P2113710230203020399 CA2
........XXXXXX ..XXXXXXX ..1008308001910083080019P21138443401220604669 CA2
........XXXXXX ..XXXXXXX ..1009145004810091450048D2113705459839230 CA2
........XXXXXX ..XXXXXXX ..1009550001210095500012D01130261610035767 CT2
........XXXXXX ..XXXXXXX ..1009712001710097120017D21139182510799195 CA1
Once I get the account numbers in the FB file I would want to compare it with another file of which is again a FB file of 80 bytes. This file would have duplicates, I need to remove the duplicates and then compare and get the matching records from the two files into another file.
The second file looks like this
Code:
BROWSE XXX.XXX Line 00000000 Col 001 080
Command ===> Scroll ===> CSR
********************************* Top of Data **********************************
10146970123
10158680065
10160760038
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Sudip,
Kolusu gave you an efficient JOINKEYS solution that works.
You came back with an inefficient ICETOOL job that doesn't work. Why would you expect him to waste his time figuring out why your inefficient solution doesn't work?
Did you try Kolusu's solution? If so, and it didn't meet your requirements, then explain what you wanted and what you got. Then he can help you.