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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
rohanthengal

Active User


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

PostPosted: Tue Jan 04, 2011 11:21 am    Post subject: need to move PIC clause to cloumn 40 for 1000 rows !
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    Post subject: Reply to: need to move PIC clause to cloumn 40 for 1000 rows
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    Post subject:
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: 181
Location: Globe, India

PostPosted: Tue Jan 04, 2011 11:49 am    Post subject:
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: 181
Location: Globe, India

PostPosted: Tue Jan 04, 2011 12:03 pm    Post subject:
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    Post subject:
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    Post subject:
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: 181
Location: Globe, India

PostPosted: Tue Jan 04, 2011 6:08 pm    Post subject:
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: 6968
Location: porcelain throne

PostPosted: Tue Jan 04, 2011 6:49 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts compare 2 rows within the same file ram_vizag SYNCSORT 7 Wed Jun 14, 2017 12:34 am
No new posts after TBSARG: Row 370 from 1000 Pedro TSO/ISPF 1 Fri Apr 14, 2017 2:32 am
No new posts To display values of multiple rows in... vinu78 DB2 2 Thu Mar 09, 2017 1:20 pm
No new posts how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm
No new posts DB2 9.1.0 not move values to Host-Var... Miguel Fernandez DB2 8 Wed Jan 25, 2017 8:24 pm


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