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

How to insert a single character for a set of lines


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

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Thu Dec 11, 2008 12:33 pm
Reply with quote

Hi,

I am having doubt in mainframe edit commands, like
Code:
))0001 CREATE TABLE shandb.testing           
000002 ( "COLA" CHAR(6) NOT NULL ,           
000003 "COLB" CHAR(4) NOT NULL)               
000004 PARTITION BY                           
000005 ( COLA ASC,                           
000006 COLB ASC)                             
000007 (PARTITION 1 ENDING AT('15047','OE46')
000008 ,PARTITION 2 ENDING AT('15047','OE50'))
))0009 IN shandb.parts                       


Using '))' i can move group of line to right. In the first column for a set of lines i was to add or append '--'. Is it possible, is there any command for this purpose or any techniques.

Right now, iam putting -- for each and every line, thats why???


Sushanth
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Dec 11, 2008 1:55 pm
Reply with quote

Have you tried the CHANGE command
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Thu Dec 11, 2008 2:19 pm
Reply with quote

Yes Expat,

Got it.
Code:
c all '  ' '--' 1 2


Is there anyway to limit it to a set of rows. Like i want to change only the column 1 to 2 and rows 10 to 15, Rest of the rows shouldn't be changed.

Sushanth
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Thu Dec 11, 2008 2:31 pm
Reply with quote

You can use lables to limit the effect of the CHANGE command.

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

Active User


Joined: 02 Sep 2005
Posts: 189
Location: Noida

PostPosted: Thu Dec 11, 2008 2:35 pm
Reply with quote

Yes you can do it.

You can limit the no. of rows by inserting labels;
You can also limits the the colums being effected.

try this command

Code:
c all '  ' '--'  1 .a .b


Before executing the above command. mark the initial row as .a and last row as .b ( mark the set of rows to be changed).

Then '1' denotes the column no. where the change will actually take effect.

Hope this helps.

Thanks,
-Kapil.
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Thu Dec 11, 2008 2:39 pm
Reply with quote

Thank You Very Much O & Kapil.........
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Dec 11, 2008 2:47 pm
Reply with quote

Hi,

Rows can be controlled using labels such as,
Code:
c all Sushanth anuj .a .b
where .a is label at row (line number) 10 & .b is at row 15 - am not sure about columns.
Back to top
View user's profile Send private message
hikaps14

Active User


Joined: 02 Sep 2005
Posts: 189
Location: Noida

PostPosted: Thu Dec 11, 2008 2:54 pm
Reply with quote

Hi Anuj,

You can also control columns. I coded the command in the above post.

There is another way of doing this. You can try using BNDS command. This is a way to limit your mainframe editor to particular columns. once you set your bounds. All the editor commands work within the bounds columns.

Hope this helps.
Thanks,
-Kapil.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Dec 11, 2008 5:52 pm
Reply with quote

You can also exclude rows and the Change command can work on excluded rows only or non-excluded rows only; combined with BNDS you can get very specific about what gets changed.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Dec 11, 2008 6:33 pm
Reply with quote

But BNDS needs to be set back to original values, isn't it ? I'm on the way can't chek it though..
Back to top
View user's profile Send private message
hikaps14

Active User


Joined: 02 Sep 2005
Posts: 189
Location: Noida

PostPosted: Thu Dec 11, 2008 6:37 pm
Reply with quote

Yes,

You are absolutely correct. After using BNDS for first time, I forgot to set it back. Later I found something not working. Then I realised, that we need to set it back.

Thanks,
-Kapil.
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Thu Dec 11, 2008 6:40 pm
Reply with quote

Guyz,

Can you give me BNDS commands, so that i could try also...

Sushanth
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Dec 11, 2008 6:41 pm
Reply with quote

BNDS <start> <end> to set or change
BNDS to reset to default
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Dec 11, 2008 6:44 pm
Reply with quote

Quote:
Can you give me BNDS commands, so that i could try also...


desolated, but no one around here can do that icon_biggrin.gif
if You ask nicely... ISPF might give it to You as a <CHRISTMAS> present
look at the ispf docs or as usual PF1 is Your friend
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Dec 12, 2008 11:23 am
Reply with quote

hikaps14 wrote:
that we need to set it back.
That's why I didn't suggest about it in my other post, they are applicable at your "profile" level & set to unless changed back to original value, if not a mess starts. Once one of new joinee in my team did it..and then..jokes of the day were started.
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Fri Dec 12, 2008 1:16 pm
Reply with quote

Guyz,

Code:
  c all '  ' '--'  1 .a .b

&
Code:
  BNDS <start> <end> to set or change
  BNDS to reset to default


Are very handy editior functions.......

And anuj, i think according to my profile setting i got to RESET BNDS. WOW, if you don't know how to RESET, that could be a real work.
I got to Thank ROBERT for the RESET

Is there any command to know whether these settings are set or not.
Like for instance in SDSF, owner & prefix can confuse people sometimes.
For my profile,
Code:
PREFIX=*****  DEST=(ALL)  OWNER=HXSULL**  SORT=JNUM/D  SYSNAME=   

This particular setting is ON, on the top. For others its not there.
I don't know, how it got there for me. Is there any commands or any settings for this appear.
Likewise is there any commands in the editor to know what is ON ? and what is OFF ?
Sushanth Bobby
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Dec 12, 2008 6:04 pm
Reply with quote

Yes -- issue the command PROF to see your entire profile options. One of the lines will be =BNDS> and will have less than (<) and greater than (>) signs where the boundaries are currently set.
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Fri Dec 12, 2008 6:41 pm
Reply with quote

Thank You Robert
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Sat Dec 13, 2008 12:44 am
Reply with quote

When I want to accomplish prefixing a range of lines with a constant, I use the )) block command to shift right, then insert my prefix above the 1st line of the shifted range, then use a Move/overlay combination.
Code:
m00011 //*                                                           
oo0012    //DELETE  EXEC PGM=IEFBR14                                 
000013    //SORTOUT  DD  DSN=xxxxxxx.TEST.xxxxxxxx.xxx.TEST.D&YYMMDD,
000014    //             DISP=(MOD,DELETE,DELETE),                   
oo0015    //             SPACE=(TRK,0)
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Mon Dec 15, 2008 10:12 am
Reply with quote

Nice Technique Terry.....
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Mon Dec 15, 2008 11:05 am
Reply with quote

Also, easy to undo simply by shifting the range left via the block shift command. The only thing you need to be aware of is shifting data too far to the right (col 73 in the case of COBOL source.
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 How to append a PS file into multiple... JCL & VSAM 3
No new posts Submit multiple jobs from a library t... JCL & VSAM 14
No new posts Insert header record with record coun... DFSORT/ICETOOL 14
No new posts Insert system time/date (timestamp) u... DFSORT/ICETOOL 5
No new posts Identify Program Insert DB2 7
Search our Forums:

Back to Top