View previous topic :: View next topic
|
Author |
Message |
sivatechdrive
Active User
Joined: 17 Oct 2004 Posts: 191 Location: hyderabad
|
|
|
|
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 |
|
|
krisprems
Active Member
Joined: 27 Nov 2006 Posts: 649 Location: India
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Douglas Wilder
Active User
Joined: 28 Nov 2006 Posts: 305 Location: Deerfield IL
|
|
|
|
It looks to me that you need:
Code: |
C ALL 10 '20070621' '20071011' |
|
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
By the way, it has nothing to do with TSO. This is an ISPF Edit Command.
O. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
For an ISPF EDIT command, I'd go with
c all p'xxxxxxx' '20071011' 10 |
|
Back to top |
|
|
Douglas Wilder
Active User
Joined: 28 Nov 2006 Posts: 305 Location: Deerfield IL
|
|
|
|
The command you gave looks for x's
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Yep, it was a typo. I meant to use the equals (=), i.e. any character. |
|
Back to top |
|
|
hemanth.nandas
Active User
Joined: 18 Aug 2007 Posts: 120 Location: India
|
|
|
|
Hi Sivatechdrive,
Use This
Code: |
C '20070621' '20071011' ALL |
|
|
Back to top |
|
|
nuthan
Active User
Joined: 26 Sep 2005 Posts: 146 Location: Bangalore
|
|
|
|
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 |
|
|
|