Posted: Thu Feb 14, 2008 9:13 am Post subject: Updating a field in file by checking in the other file
Hi,
I have a file with Record format as FB and Record length as 304 which is used as an input file.
If the first two charcters in this file are "1D" I have to extract 4 charcters starting from position 14.
If the first two charcters in this file are "1H" I have to extract 4 charcters starting from position 16.
I have one more file with Record format as FB and Record length as 131 which is used as INPUT&OUTPUT file.
The extracted charcaters from the first file should be updated in the second file starting from position 39.
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Thu Feb 14, 2008 12:06 pm Post subject:
I don't really know what your job is supposed to do. The syntax is wrong (you have duplicate INCLUDE and OUTREC statements in CPY1CNTL) and it doesn't do a SPLICE.
At any rate, assuming that you want to overlay the constant from the first record of file1 into the first record of file2, the second record of file1 into the second record of file2, etc, you can use this DFSORT/ICETOOL job to do what you asked for:
_________________ 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
Thanks for your reply. Your code is not overriding the 4 characters in the output starting from position 39 by taking the 4 characters from either positions 14 or 16 depending on 1D or 1H.
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Fri Feb 15, 2008 12:10 pm Post subject:
When I run my job with data like you described, it certainly does do what you asked for.
So if the job is not working for you, either the data doesn't look like what you said it does, or you changed my job in some way, or your site has changed the default options in some way that makes a difference.
Saying it doesn't work without any other information isn't helpful. Send me the following offline (yaeger@us.ibm.com) and I'll take a look:
Your complete JCL and control statements.
The complete set of TOOLMSG and DFSMSG messages you received when you ran the job. _________________ 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
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