Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
venkatarao

New User


Joined: 19 Dec 2004
Posts: 24
Location: hyderabad

PostPosted: Thu May 03, 2007 8:47 pm    Post subject: Set one field(having length 1 byte) value to Y using DFSORT
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 Moderator


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

PostPosted: Thu May 03, 2007 9:58 pm    Post subject:
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: 24
Location: hyderabad

PostPosted: Fri May 04, 2007 2:13 pm    Post subject: Re: Set one field(having length 1 byte) value to Y using DFS
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: 1439
Location: Bangalore,India

PostPosted: Fri May 04, 2007 2:23 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Fri May 04, 2007 2:27 pm    Post subject:
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 Moderator


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

PostPosted: Fri May 04, 2007 8:37 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts INVALID FIELD OR CONSTANT IN SORTOF ?? Ron Klop DFSORT/ICETOOL 8 Wed Jan 11, 2017 3:44 pm
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 31 Tue Dec 06, 2016 8:04 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts SQZ pipe delimited file with 1 column... Rick Silvers DFSORT/ICETOOL 2 Sun Nov 06, 2016 8:11 pm
No new posts Joinkeys operation when key1 and key2... Susanta DFSORT/ICETOOL 5 Wed Nov 02, 2016 5:35 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us