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

TSO change command needed


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sivatechdrive

Active User


Joined: 17 Oct 2004
Posts: 191
Location: hyderabad

PostPosted: Thu Oct 11, 2007 8:20 pm
Reply with quote

Hi all

I have a file as below
----5-----10-----15-----20-------
0001 ABS 20070621
0001 NBS 20070621
0002 BBK 20070621
0003 CBS 20070621
0004 ABS 20070621
0005 PBK 20070621

I have to change all the dataset of the file to 20071011
as below
i know it can be done by sort (outrec)
is there any tso command or any other way to achieve the same
----5-----10-----15-----20-------
0001 ABS 20071011
0001 NBS 20071011
0002 BBK 20071011
0003 CBS 20071011
0004 ABS 20071011
0005 PBK 20071011



Thanks n Regards
Prasad
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Thu Oct 11, 2007 8:41 pm
Reply with quote

sivatechdrive
if the date is in 10th position and all the date starts from 2, then TSO command would be
Code:

C ALL 10 '2' '20071011'
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Thu Oct 11, 2007 9:25 pm
Reply with quote

Hello,

This
Code:
C ALL 10 '2' '20071011'
generates "200710110070621"
on this system. . . . Any non-blanks that would be overritten are shifted right to make room for the "inserted" data. If the positions to be over-written are blank the 0071011 is put there and characters further to the right are not shifted.
Back to top
View user's profile Send private message
Douglas Wilder

Active User


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

PostPosted: Thu Oct 11, 2007 9:30 pm
Reply with quote

It looks to me that you need:
Code:
C ALL 10 '20070621' '20071011'
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Thu Oct 11, 2007 10:43 pm
Reply with quote

By the way, it has nothing to do with TSO. This is an ISPF Edit Command.

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

Global Moderator


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

PostPosted: Thu Oct 11, 2007 11:20 pm
Reply with quote

For an ISPF EDIT command, I'd go with

c all p'xxxxxxx' '20071011' 10
Back to top
View user's profile Send private message
Douglas Wilder

Active User


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

PostPosted: Fri Oct 12, 2007 12:05 am
Reply with quote

The command you gave looks for x's icon_sad.gif

c all p'########' '20071011' 10
Would look for 8 numeric digits in starting in col 10.

c all p'========' '20071011' 10
Would look for 8 characters in starting in col 10.
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Fri Oct 12, 2007 12:08 am
Reply with quote

Yep, it was a typo. I meant to use the equals (=), i.e. any character.
Back to top
View user's profile Send private message
hemanth.nandas

Active User


Joined: 18 Aug 2007
Posts: 120
Location: India

PostPosted: Fri Oct 12, 2007 9:54 am
Reply with quote

Hi Sivatechdrive,

Use This

Code:
C '20070621' '20071011' ALL
Back to top
View user's profile Send private message
nuthan

Active User


Joined: 26 Sep 2005
Posts: 146
Location: Bangalore

PostPosted: Fri Oct 12, 2007 10:08 am
Reply with quote

If you want change in the whole file where ever from 20070621 to 20071011 the you have to use C ALL '20070621' '20071011'
But if u want to change only in a particualr field then use that field starting position on chage command as
C ALL 10 '20070621' '20071011'
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 -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts DTL - how to define key with stacked ... TSO/ISPF 3
No new posts LTJ command CA Products 4
No new posts Query on edit primary command CLIST & REXX 5
Search our Forums:

Back to Top