Joined: 19 Sep 2006 Posts: 4 Location: Milwaukee Wi
I am new to using ICETOOL and I am having trouble getting the results I need. I have looked over the manuals and checked several examples and have acheived limited success.
I am trying to splice two files together. The common field is the PO field that is (6,19) in both files. One file is a header file and the other is the item file. there is one header record to many item records. I need to take the header file and combine it with 5 fields from the item file.
When I execute the code the ALLRCDS DD only has header data and non of the item records. the record length of both files is 200. The ALLRECDS remains at 200 after execution. I tried to define the new record length in the ALLRCDS DD, but only got NULL values in the 201 - 253 positions.
How can I splice the 5 item records to the header?
Most important, show an example of the records in each input file and what you expect for output (you can just show the relevant fields with dots in between them).
Show the control statements you're using for CPY1CNTL and CPY2CNTL.
My first guess would be that you want WITHALL instead of WITHEACH but I couldn't say for sure without the above information. You would use WITHEACH if there are five different item records, each with one field that you want. You would use WITHALL if every record has the five items you want.
In addition, you seem to be trying to use CPY2CNTL for the second COPY operator and the SPLICE operator. I don't think you really want to do that.
Also, you should remove the DCB attributes from the ALLRCDS DD. You need to have the job set up correctly so that the record length is automatically set to 253; otherwise you will get an error message. Again, once you give me the information I asked for, I can tell you how to set it up correctly.
Here are is the example of the records in each input file and what I need for output The file shows a sample header and multiple Items, with a final output file. (See Attachment)
Well, I downloaded your icetool.doc file and it appeared to be a copy of your post. I couldn't find the input records or output records you mentioned - just the JCL which doesn't tell me anything.
I don not have control statements for CPY1CNTL and CPY2CNTL. I basically used an example I found on the IBM web site to create a shell of what I need.
Huh? Did you really expect it to work without the control statements in CPY1CNTL and CPY2CNTL? If you found something on the DFSORT website then it would certainly have the controls statements. And I'm sure it didn't have USING(CPY2) for both the second COPY operator and the SPLICE operator.
If you want my help, I need to see your input and output records. Try sending them to me directly via e-mail (firstname.lastname@example.org). Put "DFSORT" somewhere in your Subject line to catch my attention.