View previous topic :: View next topic
|
Author |
Message |
rohanthengal
Active User
Joined: 19 Mar 2009 Posts: 206 Location: Globe, India
|
|
|
|
hi frnds,
we need to move only PIC clause to column 40 for all rows in one shot to meet with coding standards of the shop.
If i do it manually then it becomes boaring and irritating stuff.
Is there any means to do so except any REXX tool / CLIST etc... ?
If you know any REXX ISREDIT command then let me know.
Thank you so much. |
|
Back to top |
|
|
mutvijayan
New User
Joined: 22 Nov 2010 Posts: 3 Location: Chennai
|
|
|
|
Hi,
I think you can use BNDS line command if all the PIC clause in same position.
Thanks. |
|
Back to top |
|
|
Guest
|
|
|
|
Hi,
You can use the BNDS line command to set the boundary for the shift operator and then use the Shift operator" )) " to achieve the same.
Code: |
=BNDS> <
000001 WS-VARIABLE PIC
|
Code: |
=BNDS> <
000001 WS-VARIABLE PIC
|
before:
Code: |
=COLS> ----+----1----+----2----+----3----+----4----+----5
****** ***************************** Top of Data ********
=BNDS> <
)5 WS-VARIABLE PIC
|
after:
Code: |
=COLS> ----+----1----+----2----+----3----+----4
****** ***************************** Top of Dat
=BNDS> <
000001 WS-VARIABLE PIC
|
Only the PIC has moved.
Set the BNDS back, once done.
Hope your requirement is met.
devil13
There is always a better solution |
|
Back to top |
|
|
rohanthengal
Active User
Joined: 19 Mar 2009 Posts: 206 Location: Globe, India
|
|
|
|
thank you for your assistance.
but i am not getting the usage of 5 and operators used ')', '<' !
Please give idea ! |
|
Back to top |
|
|
rohanthengal
Active User
Joined: 19 Mar 2009 Posts: 206 Location: Globe, India
|
|
|
|
thank you... dear... its done... |
|
Back to top |
|
|
Dsingh29
Active User
Joined: 16 Dec 2008 Posts: 132 Location: IBM
|
|
|
|
hey Rohan,
Can you please share, how you accomplished your task of moving all PIC clauses at once. |
|
Back to top |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
You can do a
C all ' PIC' ' PIC' 1 39
and repeat (maximum 32 times) until ' PIC' not found |
|
Back to top |
|
|
rohanthengal
Active User
Joined: 19 Mar 2009 Posts: 206 Location: Globe, India
|
|
|
|
hi GuyC,
thanks.... also the suggestion provided by devil13 works smooth n very easy n speedy driven..
hi Dsigngh,
this is the step wise description:
1. first right BNDS above the line from which you want block movement
2. then it shows some pointer i.e. '>' , which can be adjusted manually..
e.g. if u want to move PIC in the below statements, then place '>' just before PIC as shown below:
BNDS >
))5 01 ws-num PIC X(10).
01 ws-sal PIC 9(10)v9(2).
)) 01 ws-stat PIC X.
and give the amount of shift u want...
in this example, i want to move PIC clause by 5 columns, so i gave 5.
but make sure that all PIC in block, should be aligned in the same column else you wont succeed.
Thanks. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Dsigngh,
only columns between < and> are affected by ISPF EDIT Commands that do not explicitly stipulate columns outside the Bounded Column range (<>).
column/data shift commands (as all line commands) only affect the bounded range.
anything outside of the < and > are not affected.
I would also suggest using > and >> line commands,
instead of ) and )). with ) you can lose data if you specifiy too many columns. whereas > will only shift thru spaces and not truncate data. |
|
Back to top |
|
|
Dsingh29
Active User
Joined: 16 Dec 2008 Posts: 132 Location: IBM
|
|
|
|
thanks dbz and rohan... |
|
Back to top |
|
|
|