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

need to move PIC clause to cloumn 40 for 1000 rows !


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rohanthengal

Active User


Joined: 19 Mar 2009
Posts: 206
Location: Globe, India

PostPosted: Tue Jan 04, 2011 11:21 am
Reply with quote

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
View user's profile Send private message
mutvijayan

New User


Joined: 22 Nov 2010
Posts: 3
Location: Chennai

PostPosted: Tue Jan 04, 2011 11:36 am
Reply with quote

Hi,

I think you can use BNDS line command if all the PIC clause in same position.

Thanks.
Back to top
View user's profile Send private message
Guest







PostPosted: Tue Jan 04, 2011 11:39 am
Reply with quote

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

PostPosted: Tue Jan 04, 2011 11:49 am
Reply with quote

thank you for your assistance.
but i am not getting the usage of 5 and operators used ')', '<' !

Please give idea !
Back to top
View user's profile Send private message
rohanthengal

Active User


Joined: 19 Mar 2009
Posts: 206
Location: Globe, India

PostPosted: Tue Jan 04, 2011 12:03 pm
Reply with quote

thank you... dear... its done...
Back to top
View user's profile Send private message
Dsingh29

Active User


Joined: 16 Dec 2008
Posts: 132
Location: IBM

PostPosted: Tue Jan 04, 2011 1:51 pm
Reply with quote

hey Rohan,


Can you please share, how you accomplished your task of moving all PIC clauses at once.
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Tue Jan 04, 2011 4:21 pm
Reply with quote

You can do a
C all ' PIC' ' PIC' 1 39

and repeat (maximum 32 times) until ' PIC' not found
Back to top
View user's profile Send private message
rohanthengal

Active User


Joined: 19 Mar 2009
Posts: 206
Location: Globe, India

PostPosted: Tue Jan 04, 2011 6:08 pm
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Jan 04, 2011 6:49 pm
Reply with quote

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
View user's profile Send private message
Dsingh29

Active User


Joined: 16 Dec 2008
Posts: 132
Location: IBM

PostPosted: Wed Jan 05, 2011 5:16 pm
Reply with quote

thanks dbz and rohan...
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts To get the count of rows for every 1 ... DB2 3
No new posts Exclude rows with > than x occurre... DFSORT/ICETOOL 6
No new posts COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts Convert single row multi cols to sing... DFSORT/ICETOOL 6
No new posts How to move the first field of each r... DFSORT/ICETOOL 5
Search our Forums:

Back to Top