View previous topic :: View next topic
|
Author |
Message |
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Have you tried the CHANGE command |
|
Back to top |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
Yes Expat,
Got it.
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 |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
You can use lables to limit the effect of the CHANGE command.
O. |
|
Back to top |
|
|
hikaps14
Active User
Joined: 02 Sep 2005 Posts: 189 Location: Noida
|
|
|
|
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 |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
Thank You Very Much O & Kapil......... |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
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 |
|
|
hikaps14
Active User
Joined: 02 Sep 2005 Posts: 189 Location: Noida
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
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 |
|
|
hikaps14
Active User
Joined: 02 Sep 2005 Posts: 189 Location: Noida
|
|
|
|
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 |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
Guyz,
Can you give me BNDS commands, so that i could try also...
Sushanth |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
BNDS <start> <end> to set or change
BNDS to reset to default |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
Can you give me BNDS commands, so that i could try also... |
desolated, but no one around here can do that
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
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 |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
Thank You Robert |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
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 |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
Nice Technique Terry..... |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
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 |
|
|
|