IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Set one field(having length 1 byte) value to Y using DFSORT


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
venkatarao

New User


Joined: 19 Dec 2004
Posts: 23
Location: hyderabad

PostPosted: Thu May 03, 2007 8:47 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu May 03, 2007 9:58 pm
Reply with quote

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
View user's profile Send private message
venkatarao

New User


Joined: 19 Dec 2004
Posts: 23
Location: hyderabad

PostPosted: Fri May 04, 2007 2:13 pm
Reply with quote

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
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Fri May 04, 2007 2:23 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri May 04, 2007 2:27 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Fri May 04, 2007 8:37 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 9
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
Search our Forums:

Back to Top