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
 

 

refrence modifier problem

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

New User


Joined: 16 Jan 2006
Posts: 53
Location: pune

PostPosted: Fri Jan 27, 2006 7:37 pm    Post subject: refrence modifier problem
Reply with quote

could u please suggest me whether the syntax is correct or not

SUB(X-PACS-SUB)(3:ctra)

where (3:ctra) is a refrence modifier and ctra is a counter variable.

thanks
Dipanshu
Back to top
View user's profile Send private message

DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Fri Jan 27, 2006 11:14 pm    Post subject: Re: refrence modifier problem
Reply with quote

dipanshu,

Yes, your syntax is correct. Valuable(subscript)(reference modifier)

Dave
Back to top
View user's profile Send private message
brahmanandareddy

New User


Joined: 16 Dec 2004
Posts: 44
Location: Hyderabad

PostPosted: Fri Jan 27, 2006 11:31 pm    Post subject:
Reply with quote

Hi,

I dont think we can specify any other thing apart from starting position and length in reference modification.

Syntax is

Var(start pos:length)

Eg: WS_DATE(1:2)

And for subscript you can use this way.

SUB(element)(starting position:length)


Correct me if I am wrong......

Thank you,
Brahma
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Fri Jan 27, 2006 11:56 pm    Post subject: Re: refrence modifier problem
Reply with quote

brahmanandareddy,

Is your concern having a variable as starting-position or length? This can be done. If this is not you're concern, please clairify.

Thanks,

Dave
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Jan 28, 2006 5:03 am    Post subject:
Reply with quote

Hi Dipanshu,

It might be a good idea to tell us what each of the elements are. For e.g.:

SUB is a pic 9(12) variable containing blah-blah..
X-PACS-SUB is a subscript defined as blah-blah...
3 is the 3rd position of ?
ctra is a variable defined as pic 9(2) containing the length of blah-blah...

You might have them reversed and we can't tell unless you give this info.
Back to top
View user's profile Send private message
gowtham_1982
Warnings : 1

Active User


Joined: 02 Dec 2005
Posts: 109

PostPosted: Sat Jan 28, 2006 2:22 pm    Post subject: Re: refrence modifier problem
Reply with quote

dipanshu wrote:
could u please suggest me whether the syntax is correct or not

SUB(X-PACS-SUB)(3:ctra)

where (3:ctra) is a refrence modifier and ctra is a counter variable.

thanks
Dipanshu



hi Dipanshu,

I feel what Brahma said is right. i tried once with specifying the identifier instead of saying the value for it. I got it correct syntactically, but in run time i didn't get the expected result.

can anyone suggest the possible reasons for it. That would add more info.


corrections and suggestions welcomed...

gowtham
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Jan 28, 2006 10:34 pm    Post subject:
Reply with quote

You can use variable instead of literals in ref/mod. You just have to make sure they contain the values you think they contain.

The reason I requested the info is that I'm suspecious of a data variable named "SUB".
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 Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts ROUNDED Problem with COMPUTE statement shalem COBOL Programming 11 Thu Feb 09, 2017 8:16 pm
No new posts SYMNAMES problem jacobdng DFSORT/ICETOOL 7 Thu Dec 22, 2016 7:47 am
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm
No new posts Problem in Running Query via JCL vickey_dw DB2 3 Tue Oct 18, 2016 11:11 pm


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