View previous topic :: View next topic
|
Author |
Message |
venkatarao
New User
Joined: 19 Dec 2004 Posts: 23 Location: hyderabad
|
|
|
|
Hi,
In one file i would like to set one field(having length 1 byte) value to Y.
Field position in the file is 2585.
Can any one explain me In detail how i can do this using DFSORT utility.
Regards
venkat |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Here's a DFSORT job that will do what you asked for:
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file
//SORTOUT DD DSN=... output file
//SYSIN DD *
OPTION COPY
INREC OVERLAY=(2585:C'Y')
/*
|
|
|
Back to top |
|
|
venkatarao
New User
Joined: 19 Dec 2004 Posts: 23 Location: hyderabad
|
|
|
|
Hi Frank,
Can i able to Reset that value within the same input File without using output File (i mean to say i don't want to copy all that records to Output File).
I would like to use only Input file to Reset the value.
Cheers
venkat |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Venkat,
Quote: |
Can i able to Reset that value within the same input File without using output File |
Use the same file for both sortin and sortout with disp as old. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Not advisable - always keep your original source safe until your processing has finished.
Anyway, you still have to read and write each record to update it, so why not write to a new file, and delete the old file on sucessful completion of the process. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
DFSORT only supports using the same file for input and output for a sort, not for a copy or a merge. And it's NOT a good idea to use the same file for input and output since you can end up destroying the input file if something goes wrong. |
|
Back to top |
|
|
|