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

Reference modification with tallying counter


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

Active User


Joined: 27 May 2008
Posts: 121
Location: India

PostPosted: Fri Dec 04, 2009 3:29 pm
Reply with quote

Hi,

Suppose i have a tallying counter for leading spaces, we are tallying a field of 10 bytes and we want to remove all leading spaces.

I use a code

INSPECT CV-NAME TALLYING SUB FOR LEADING SPACES


MOVE CV-NAME((SUB + 1):(LN - SUB))

TO CV-NAME-NEW

Note: Here, LN is length of CV-NAME which is 10 bytes.

Suppose SUB is of 10 bytes, then i am afraid, the prgram will go to 11th byte, please suggest how such cases can be handled, as CV-NAME field can have SPACES completely.

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

Global Moderator


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

PostPosted: Fri Dec 04, 2009 4:29 pm
Reply with quote

before the inspect, IF CV-NAME = SPACES, skip the inspect and the move.
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 Two input files & writing counter... DFSORT/ICETOOL 12
No new posts Reference for COND parameter. JCL & VSAM 1
No new posts Reference documentation DFSDDLT0 IMS DB/DC 2
No new posts Sort counter to show records combination JCL & VSAM 2
No new posts Trying to reference a javascript glob... CLIST & REXX 7
Search our Forums:

Back to Top