Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Reference modification with tallying counter

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Reference modification with tallying counter
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: 6968
Location: porcelain throne

PostPosted: Fri Dec 04, 2009 4:29 pm    Post subject:
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    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 StreamWeaver language reference chetanambi Compuware & Other Tools 1 Wed Jul 05, 2017 12:50 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
This topic is locked: you cannot edit posts or make replies. Sort card to replace text using cross... Susanta SYNCSORT 32 Tue Sep 13, 2016 4:17 pm
This topic is locked: you cannot edit posts or make replies. MEMOAPIX - Searching for a Reference ... Steve Coalbran All Other Mainframe Topics 13 Wed Feb 03, 2016 12:01 pm
No new posts Making Reference Phrase field " ... Casper656 TSO/ISPF 11 Thu Feb 05, 2015 7:05 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us