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 insert a single character for a set of lines
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Thu Dec 11, 2008 12:33 pm    Post subject: How to insert a single character for a set of lines
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: 8593
Location: Back in jolly old England

PostPosted: Thu Dec 11, 2008 1:55 pm    Post subject:
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: 1013
Location: India

PostPosted: Thu Dec 11, 2008 2:19 pm    Post subject:
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: 2360
Location: Israel

PostPosted: Thu Dec 11, 2008 2:31 pm    Post subject:
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    Post subject: Reply to: How to insert a single character for a set of line
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: 1013
Location: India

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

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

Senior Member


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

PostPosted: Thu Dec 11, 2008 2:47 pm    Post subject:
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    Post subject: Reply to: How to insert a single character for a set of line
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: 7913
Location: Bellevue, IA

PostPosted: Thu Dec 11, 2008 5:52 pm    Post subject:
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

Senior Member


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

PostPosted: Thu Dec 11, 2008 6:33 pm    Post subject:
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    Post subject: Reply to: How to insert a single character for a set of line
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: 1013
Location: India

PostPosted: Thu Dec 11, 2008 6:40 pm    Post subject:
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: 7913
Location: Bellevue, IA

PostPosted: Thu Dec 11, 2008 6:41 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Thu Dec 11, 2008 6:44 pm    Post subject: Reply to: How to insert a single character for a set of line
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

Senior Member


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

PostPosted: Fri Dec 12, 2008 11:23 am    Post subject: Re: Reply to: How to insert a single character for a set of
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: 1013
Location: India

PostPosted: Fri Dec 12, 2008 1:16 pm    Post subject:
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: 7913
Location: Bellevue, IA

PostPosted: Fri Dec 12, 2008 6:04 pm    Post subject:
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: 1013
Location: India

PostPosted: Fri Dec 12, 2008 6:41 pm    Post subject:
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: 1238
Location: Richfield, MN, USA

PostPosted: Sat Dec 13, 2008 12:44 am    Post subject:
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: 1013
Location: India

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

Nice Technique Terry.....
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 -> TSO/ISPF All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Two Selects in a single select query Rohit Umarjikar DB2 1 Fri Nov 04, 2016 8:46 pm
No new posts Single COPY CICS TS datasets and when... Kyle Carroll CICS 2 Tue Oct 11, 2016 9:47 pm
This topic is locked: you cannot edit posts or make replies. DSList (3.4) cannot display Chinese c... jacobdng TSO/ISPF 4 Wed Oct 05, 2016 2:51 pm
No new posts Insert Lines in JCL with Rexx after a... Willy Jensen CLIST & REXX 3 Tue Aug 30, 2016 4:18 pm


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