Posted: Wed Dec 12, 2007 2:05 am Post subject: Merge temp, different LRECL files and use same file for I&am
Hi,
I have two temp files created from a SORT step (&&FILE1 and &&FILE1). The LRECL of these two files is 131.
I have one more file with FB format and LRECL as 304. Say this as INPUT file.
Now, I wanna merge these three files (&&FILE1, &&FILE1 and INPUT) into a single output file. The thing is I wanna use the INPUT file as the output file.
How about using another temp dataset to concatenate all the input datasets and then copy this temp dataset to the desired output dataset? I guess you can do that in 2 steps. I have not tested anything given below as I am at home now.
_________________ Vivek G
--------------------------------------
A dream is just a dream. A goal is a dream with a plan and a deadline. (Harvey Mackay)
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Wed Dec 12, 2007 11:14 am Post subject:
vkphani,
Concatenate both temp files to a single DD and copy that to a temp file of 304 length. Now use DISP=mod and copy the contents of your input file to temp file and in the next pass copy the temp file back to Input file.
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Thu Dec 13, 2007 11:15 am Post subject:
You said in your original post that FILE1 and FILE2 have LRECL=131. But the job you show above creates FILE1 and FILE2 with LRECL=127. That's why you got the ICE027A message. You either need to create the FILEs with LRECL=131 or change the CTL1CNTL OUTREC statement to use 127 instead of 131.
BTW, you don't actually need that extra SORT step unless you need &&FILE1 and &&FILE2 as separate files for some reason. If not, you can use an INCLUDE statement and IFTHEN clauses in CTL1CNTL to reformat the RIVOT010.CPS.SGP.IDDEREC records directly to T1. _________________ 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
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Thu Dec 13, 2007 11:19 am Post subject:
vkphani,
In your first post you said
vkphani wrote:
I have two temp files created from a SORT step (&&FILE1 and &&FILE1). The LRECL of these two files is 131.
Now in your first step you are creating the temp files with only 127 as the LRECL. The second step would obviously fail with ICE027A because it is expecting a 131 byte file.
If you are just creating 127 bytes then change the CTL1CNTL to the following
Code:
//CTL1CNTL DD *
OUTREC FIELDS=(1,127,304:X)
btw your Job can be simplified using IFTHEN and avoid another pass.
Here is a 1 step DFSORT/ICETOOL which will do that
Joined: 31 May 2004 Posts: 391 Topics: 4 Location: Richfield, MN, USA
Posted: Fri Dec 14, 2007 11:20 pm Post subject:
Do you have a compelling reason to overlay your original input with your output? This is generally considered not a good idea unless you've backed up your original input. _________________ ....Terry
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