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
 
what is reference modification?

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

New User


Joined: 03 Jan 2006
Posts: 5
Location: india

PostPosted: Wed Jan 04, 2006 12:34 pm    Post subject: what is reference modification?
Reply with quote

please help me to know what is reference modification.
Back to top
View user's profile Send private message

umeshkmrsh

New User


Joined: 21 Sep 2005
Posts: 79
Location: India

PostPosted: Wed Jan 04, 2006 1:30 pm    Post subject:
Reply with quote

Reference modification is a feature introduced in COBOL - II. Using this feature we can extract a part of data contained in alphanumeric or alphabetic variable.

For example:
If we have a following variable:

05 WS-DATE-VAR PIC X(10) VALUE '12/06/2006'.
05 WS-MONTH-VAR PIC 9(02).

and our requirement is to retrive month part of WS-DATE-VAR.
We can use:

MOVE WS-DATE-VAR(3:2) TO WS-MONTH-VAR.

Above code will move '06' to WS-MONTH-VAR. Reference modification is similar to SUBSTR() function found in most of the other programming languages.

Its syntax is : variable(start_char:no_of_chars)
Back to top
View user's profile Send private message
umeshkmrsh

New User


Joined: 21 Sep 2005
Posts: 79
Location: India

PostPosted: Wed Jan 04, 2006 1:32 pm    Post subject:
Reply with quote

You can also refer to link http://www.fluffycat.com/cobol/cobol-refer.html for more information.
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