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

INSPECT with PERFORM statement


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

Active Member


Joined: 13 Feb 2004
Posts: 551
Location: Bangalore

PostPosted: Sat Aug 16, 2008 6:51 pm
Reply with quote

Quote:
With the additional complication you've added, the INSPECT is not the tool to use
in this case , at the first place itself you shudnt have recommended this ...and btw how does adding a BEFORE clause to your post increase the complication ? i just gave some value addition ...

For finding the location of AC1 and AC2 either you will have to do a perform checking for the exact value or else you have to use INSPECT ... let the OP decide whether he wants performance or simpler code ...

But i would strongly suggest using PERFORM
Back to top
View user's profile Send private message
GrantP

New User


Joined: 12 Aug 2008
Posts: 8
Location: Johannesburg

PostPosted: Mon Aug 18, 2008 12:11 pm
Reply with quote

@ashimer

Apologies for any misunderstanding. "additional complication" comment was directed at OP with regards

Quote:
iam sorry , forgot to say one thing

that text is 100 bytes total if i do like this then it will replace X till 100 bytes .

From AC2 just i want to replace "X" for 8 bytes.
Back to top
View user's profile Send private message
ssprabhu

New User


Joined: 25 Apr 2005
Posts: 67
Location: pune

PostPosted: Mon Aug 18, 2008 3:51 pm
Reply with quote

Thanks all, this also work isn't it ? please suggest how to reduce the 2 inspect stmt as one .

INSPECT DATA1 CONVERTING
"0123456789" TO "XXXXXXXXXX"
AFTER INITIAL "AC1: " BEFORE ", AC2"
INSPECT DATA1 CONVERTING
"0123456789" TO "XXXXXXXXXX" AFTER ", AC2"
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 Use of Perform Thru Exit COBOL Programming 6
No new posts JOIN STATEMENT PERFORMANCE. DFSORT/ICETOOL 12
No new posts Relate COBOL statements to EGL statement All Other Mainframe Topics 0
No new posts process statement for SUPREC, CMPCOLM... TSO/ISPF 4
No new posts SYNCSORT/ICETOOL JOINKEYS SORT Statem... DFSORT/ICETOOL 13
Search our Forums:

Back to Top