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
 

 

How to change data in a PS file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
shreyasm14

New User


Joined: 07 Feb 2008
Posts: 3
Location: Chicago

PostPosted: Tue Feb 12, 2008 1:55 am    Post subject: How to change data in a PS file
Reply with quote

Hi,
My control card has 2 lines


LOAD DATA LOG NO INDDN SYSREC00 INTO TABLE
ST01.ST_RULES_TABLE

My requirement is to change it to

LOAD DATA LOG NO INDDN SYSREC00 NOCOPYPEND INTO TABLE
GT21.ST_RULES_TABLE

Thus I need to add some data in line 1 and need to update some data from line2. Can you suggest how can this be accomplished? Is it possible thru Syncsort or dfsort?
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 Feb 12, 2008 2:06 am    Post subject: Reply to: How to change data in a PS file
Reply with quote

I'm curious if there's a reason why the two lines of data can't just be edited?
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Tue Feb 12, 2008 2:07 am    Post subject: Reply to: How to change data in a PS file
Reply with quote

Have you looked at the IFTHEN clause in the OUTREC/OUTFIL statements?
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Tue Feb 12, 2008 2:10 am    Post subject:
Reply with quote

If this is a repeated task, you might want to consider an ISPF Edit Macro.

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

New User


Joined: 07 Feb 2008
Posts: 3
Location: Chicago

PostPosted: Tue Feb 12, 2008 2:11 am    Post subject: Re: Reply to: How to change data in a PS file
Reply with quote

superk wrote:
I'm curious if there's a reason why the two lines of data can't just be edited?



I have thousands of the control cards and I was thinking to update them thru a JCL rather than manually.
Back to top
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Tue Feb 12, 2008 2:23 am    Post subject:
Reply with quote

Do you want to change all members of a PDS in the same way? If so FileAid is a good product to use, if you have it.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Tue Feb 12, 2008 2:59 am    Post subject: Reply to: How to change data in a PS file
Reply with quote

shresyam,

If all the 1000 control cards are to be changed in the same way then you can go for Fileaid change option rathen than going for SORT.
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: Tue Feb 12, 2008 5:15 am    Post subject:
Reply with quote

shreyasm,

I suspect you haven't described your complete requirement here, but you can use a DFSORT job like the following to do what you did ask for.

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD *
LOAD DATA LOG NO INDDN SYSREC00 INTO TABLE
ST01.ST_RULES_TABLE
/*
//SORTOUT DD DSN=...  output file (FB/80)
//SYSIN    DD    *
  OPTION COPY
  INREC IFOUTLEN=80,
   IFTHEN=(WHEN=(1,4,CH,EQ,C'LOAD'),
     BUILD=(1,32,C'NOCOPYPEND ',33,10)),
   IFTHEN=(WHEN=NONE,OVERLAY=(1:C'GT21'))
/*
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Tue Feb 12, 2008 7:24 am    Post subject: Re: Reply to: How to change data in a PS file
Reply with quote

shreyasm14 wrote:

I have thousands of the control cards and I was thinking to update them thru a JCL rather than manually.


Are you sure there are thousands of control cards? For DB2 there would be one set of control cards for an input file, not one set for each input record record.
Back to top
View user's profile Send private message
shreyasm14

New User


Joined: 07 Feb 2008
Posts: 3
Location: Chicago

PostPosted: Thu Feb 14, 2008 12:55 am    Post subject: Re: Reply to: How to change data in a PS file
Reply with quote

my shop is using SYNCSORT can you please suggest how to tackle the below lines in SYNCSORT


//SYSIN DD *
OPTION COPY
INREC IFOUTLEN=80,
IFTHEN=(WHEN=(1,4,CH,EQ,C'LOAD'),
BUILD=(1,32,C'NOCOPYPEND ',33,10)),
IFTHEN=(WHEN=NONE,OVERLAY=(1:C'GT21'))
/*
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 -> JCL & VSAM 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 Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 0 Mon Jan 02, 2017 11:16 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm


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