View previous topic :: View next topic
|
Author |
Message |
dipanshu
New User
Joined: 16 Jan 2006 Posts: 53 Location: pune
|
|
|
|
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 |
|
|
DavidatK
Active Member
Joined: 22 Nov 2005 Posts: 700 Location: Troy, Michigan USA
|
|
|
|
dipanshu,
Yes, your syntax is correct. Valuable(subscript)(reference modifier)
Dave |
|
Back to top |
|
|
brahmanandareddy
New User
Joined: 16 Dec 2004 Posts: 44 Location: Hyderabad
|
|
|
|
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 |
|
|
DavidatK
Active Member
Joined: 22 Nov 2005 Posts: 700 Location: Troy, Michigan USA
|
|
|
|
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 |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
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 |
|
|
gowtham_1982 Warnings : 1 Active User
Joined: 02 Dec 2005 Posts: 109
|
|
|
|
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 |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
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 |
|
|
|