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
 

 

Replace a particular record in file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
surya anem

New User


Joined: 20 Dec 2007
Posts: 54
Location: Hyderabad

PostPosted: Tue Apr 29, 2008 4:15 pm    Post subject: Replace a particular record in file
Reply with quote

Hi,
I have a set of records(say 100) in a file which are displayed in panels for the user to view or edit.
if a user edits the 51st record how do i write that particular record into the data file.



with regards,
surya
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Tue Apr 29, 2008 4:18 pm    Post subject: Reply to: Replace a particular record in file
Reply with quote

read into a stem all the records,
carry on the updates
rewrite the dataset/member from the stem
there is no way to update a single logical record in a PS datsset
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Apr 29, 2008 4:19 pm    Post subject:
Reply with quote

your file. What kind of file is it?
Back to top
View user's profile Send private message
surya anem

New User


Joined: 20 Dec 2007
Posts: 54
Location: Hyderabad

PostPosted: Tue Apr 29, 2008 4:20 pm    Post subject:
Reply with quote

It is a PS file.......(datafile)
Back to top
View user's profile Send private message
surya anem

New User


Joined: 20 Dec 2007
Posts: 54
Location: Hyderabad

PostPosted: Tue Apr 29, 2008 4:21 pm    Post subject:
Reply with quote

Hi
if i have some millions of records and if i have updated just one field of one record..do i have to update all the records

thanks
surya
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Tue Apr 29, 2008 4:22 pm    Post subject: Reply to: Replace a particular record in file
Reply with quote

yes,

You will not be updating all the records
You will copy from the input dataset to the output dataset..

thats the basic rule of sequential dataset processing
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Tue Apr 29, 2008 5:26 pm    Post subject: Reply to: Replace a particular record in file
Reply with quote

I have to double-check this, but I could swear that you can open a dataset and read a single record for update with EXECIO DISKRU, then write the single updated record back with the corresponding EXECIO DISKW, without having to process the entire dataset.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Mon May 05, 2008 6:18 pm    Post subject: Reply to: Replace a particular record in file
Reply with quote

I double-checked. You can update a single record. For example, if you have 10,000 records, and you want to update record 5000:

Code:

/* REXX */
"EXECIO 1 DISKRU ddname 5000"
Pull the_record
the_record = "THIS RECORD HAS BEEN CHANGED"
Push the_record
"EXECIO 1 DISKW ddname (FINIS"
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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 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 File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


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