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 Profile Log in to check your private messages Log in
 
Updating a PDS member using SORT

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

Active User


Joined: 21 Jun 2009
Posts: 160
Location: Indore

PostPosted: Thu Feb 24, 2011 8:56 am    Post subject: Updating a PDS member using SORT
Reply with quote

I'm trying to update a PDS member. In that member I have to add a line after the eighth record. Rest of the records should remain as is.

There are total 11 lines in that member. I have to add a line "Total count=". The count is calculated using sort.

One way is to split that member in 2 parts by copying into 2 temporary dataset using STOPAFT=8 and SKIPREC=9 and merging them in the same member. Is there any other way I can do this?

Thanks.
Back to top
View user's profile Send private message

superk

Moderator Team Head


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

PostPosted: Thu Feb 24, 2011 9:52 am    Post subject: Reply to: Updating a PDS member using SORT
Reply with quote

Just don't forget that you're dealing with a PDS member, so you have to copy the original content out, make the update, then copy that updated content back in. So your current process logic seems sound. Otherwise, you have to look at using a (TSO or ISPF) EDIT process which supports the concept of an update (insert) to a PDS member.

Putting an exclusive lock on a PDS by using DISP=OLD is a very poor practice that could get you in trouble. Stick with DISP=SHR.
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 Feb 24, 2011 11:50 pm    Post subject:
Reply with quote

rgupta71,

It's not clear what you're trying to do. Please show an example of the records in your input file (relevant fields only) and what you expect for output. Explain the "rules" for getting from input to output. Give the starting position, length and format of each relevant field. Give the RECFM and LRECL of the input file.
Back to top
View user's profile Send private message
rgupta71

Active User


Joined: 21 Jun 2009
Posts: 160
Location: Indore

PostPosted: Fri Feb 25, 2011 9:28 am    Post subject:
Reply with quote

Hi Frank,

I have the data that I want to insert after 8th record of a PDS member.

The PDS member contains email related information "To","from" ,"subject"
message.I am just trying to add a line after the existing message.

RECFM=FB,LRECL=80

Is this possible using sort?

Thanks
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Feb 25, 2011 10:02 am    Post subject:
Reply with quote

Hello,

Quote:
Please show an example of the records in your input file (relevant fields only) and what you expect for output. . . .
Which part of Frank's request was not clear. . . icon_sad.gif

Post the sample input and output wanted from that input along with the other requested info.
Back to top
View user's profile Send private message
rgupta71

Active User


Joined: 21 Jun 2009
Posts: 160
Location: Indore

PostPosted: Fri Feb 25, 2011 11:59 pm    Post subject: Reply to: Updating a PDS member using SORT
Reply with quote

THe content of the control card are
Code:

HELO XYZ                                                     
MAIL FROM:<xyz@abc.com>                               
RCPT TO:<xyz@abc.com>                       
DATA                                                             
TO:      xyz@abc.com                         
SUBJECT:Job complete xxxxxxxx                           
                                                                 
<current message,1 line>                                                                 
<I want to add my count here which is calculated from sort.>
                                                                 
-  THANK YOU                                                     
.                                                                 
QUIT                                                             


Thanks
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Sat Feb 26, 2011 12:09 am    Post subject: Reply to: Updating a PDS member using SORT
Reply with quote

rgupta71,

Why bother updating a pds member , why can't you just create the email content in SORT job itself?

Much easier and very easy to maintain.
Back to top
View user's profile Send private message
rgupta71

Active User


Joined: 21 Jun 2009
Posts: 160
Location: Indore

PostPosted: Sat Feb 26, 2011 1:16 am    Post subject:
Reply with quote

Good idea, Kolusu.

Thanks.
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 OC4 in SORT Mohan Kothakota DFSORT/ICETOOL 2 Tue Sep 12, 2017 6:30 pm
No new posts Copying a ps to member of a existing PDS Deepika Chikyala JCL & VSAM 10 Tue Sep 05, 2017 11:44 am
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts SORT Trailer Count - LRECL Output co... amorante DFSORT/ICETOOL 5 Tue Aug 29, 2017 8:57 pm
No new posts Changing sort Card Dynamically vickey_dw DFSORT/ICETOOL 5 Sat Aug 19, 2017 2:33 pm

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