Skip to main content

I've been asked this before, but did not have an answer!  On Unidata -- in a dictionary -- to do a multivalue OCONV, the command is

SUBR("-OCONVS",X,Y)

The question I got asked:  

"Why is there a "-" in front of that code?"

And I was not sure!  Is that because it's a system function?  It's not actually documented as to WHY -- just that it IS.

I just looked over the Using UnIData 8.2.4 doc to make sure it was not something documented.

Anyone know for sure what the "-" infers or confers beyond my guess that is means 'this is a built in system command'?



------------------------------
David Wolverton
Independent
Sunset Programming Inc
Waltham MA US
------------------------------

I've been asked this before, but did not have an answer!  On Unidata -- in a dictionary -- to do a multivalue OCONV, the command is

SUBR("-OCONVS",X,Y)

The question I got asked:  

"Why is there a "-" in front of that code?"

And I was not sure!  Is that because it's a system function?  It's not actually documented as to WHY -- just that it IS.

I just looked over the Using UnIData 8.2.4 doc to make sure it was not something documented.

Anyone know for sure what the "-" infers or confers beyond my guess that is means 'this is a built in system command'?



------------------------------
David Wolverton
Independent
Sunset Programming Inc
Waltham MA US
------------------------------

Many of the UniBasic functions don't work so well with dynamic arrays.  So UniData provides you with several built-in subroutines to help.

 

UniData Supplied Basic Routine

Description

SUBR("-ANDS", dyn1, dyn2)

ANDs dyn1 with dyn2

SUBR("-CATS", dyn1, dyn2)

Concatenates dyn1 and dyn2

SUBR("-CHARS", dyn)

CHAR( ) values of dyn

SUBR("-COUNTS", dyn, char)

Number of char in dyn

SUBR("-EQS", dyn1, dyn2)

dyn1 = dyn2

SUBR("-FIELDS", dyn, sep, num, cnt)

Returns cnt fields starting at num separated by sep in dyn

SUBR("-FMTS", dyn, fmt)

Formats dyn using fmt

SUBR("-GES", dyn1, dyn2)

dyn1 >= dyn2

SUBR("-GTS", dyn1, dyn2)

dyn1 > dyn2

SUBR("-ICONVS", dyn, conv)

Internal conversion of dyn using conv

SUBR("-IFS", dyn, then, else)

IF condition THEN ELSE

SUBR("-INDEXS", dyn, str, num)

Starting point of str in dyn beginning at num

SUBR("-LENS", dyn)

Length of dyn

SUBR("-LES", dyn1, dyn2)

dyn1 <= dyn2

SUBR("-LTS", dyn1, dyn2)

dyn1 < dyn2

SUBR("-NES", dyn1, dyn2)

dyn1 <> dyn2

SUBR("-NOTS", dyn)

NOTs dyn

SUBR("-NUMS", dyn)

is dyn a number?

SUBR("-OCONVS", dyn, conv)

Output conversion of dyn using conv

SUBR("-ORS", dyn1, dyn2)

ORS dyn1 with dyn2

SUBR("-SEQS", dyn)

SEQ( ) values of dyn

SUBR("-SPACES", nums)

Returns num spaces

SUBR("-SPLICE", dyn1, str, dyn2)

Concatenates dyn1, str, and dyn2

SUBR("-STRS", str, cnts)

Create string of str of cnt in length

SUBR("-SUBSTRINGS",dyn, num, cnt)

Returns sub dyn starting at num for cnt characters



------------------------------
David Green
Computer Programmer
Rocket Forum Shared Account
------------------------------

Many of the UniBasic functions don't work so well with dynamic arrays.  So UniData provides you with several built-in subroutines to help.

 

UniData Supplied Basic Routine

Description

SUBR("-ANDS", dyn1, dyn2)

ANDs dyn1 with dyn2

SUBR("-CATS", dyn1, dyn2)

Concatenates dyn1 and dyn2

SUBR("-CHARS", dyn)

CHAR( ) values of dyn

SUBR("-COUNTS", dyn, char)

Number of char in dyn

SUBR("-EQS", dyn1, dyn2)

dyn1 = dyn2

SUBR("-FIELDS", dyn, sep, num, cnt)

Returns cnt fields starting at num separated by sep in dyn

SUBR("-FMTS", dyn, fmt)

Formats dyn using fmt

SUBR("-GES", dyn1, dyn2)

dyn1 >= dyn2

SUBR("-GTS", dyn1, dyn2)

dyn1 > dyn2

SUBR("-ICONVS", dyn, conv)

Internal conversion of dyn using conv

SUBR("-IFS", dyn, then, else)

IF condition THEN ELSE

SUBR("-INDEXS", dyn, str, num)

Starting point of str in dyn beginning at num

SUBR("-LENS", dyn)

Length of dyn

SUBR("-LES", dyn1, dyn2)

dyn1 <= dyn2

SUBR("-LTS", dyn1, dyn2)

dyn1 < dyn2

SUBR("-NES", dyn1, dyn2)

dyn1 <> dyn2

SUBR("-NOTS", dyn)

NOTs dyn

SUBR("-NUMS", dyn)

is dyn a number?

SUBR("-OCONVS", dyn, conv)

Output conversion of dyn using conv

SUBR("-ORS", dyn1, dyn2)

ORS dyn1 with dyn2

SUBR("-SEQS", dyn)

SEQ( ) values of dyn

SUBR("-SPACES", nums)

Returns num spaces

SUBR("-SPLICE", dyn1, str, dyn2)

Concatenates dyn1, str, and dyn2

SUBR("-STRS", str, cnts)

Create string of str of cnt in length

SUBR("-SUBSTRINGS",dyn, num, cnt)

Returns sub dyn starting at num for cnt characters



------------------------------
David Green
Computer Programmer
Rocket Forum Shared Account
------------------------------

The question we had -- why do all these commands start with a  "-" ??   That's the question we had -- it's the only command that we know of that has this odd indication without any 'reason'.  Our assumption is that the "-" means "this is a built in routine" -- but we didn't have anything telling us that.  It could have just been OCONVS, but it is HYPHEN OCONVS ... why the hyphen?   We were guessing it was how someone back in the 70s and 80s decided to indicate 'these were routines we gave you' -- but no one knew for sure!



------------------------------
David Wolverton
Independent
Sunset Programming Inc
Waltham MA US
------------------------------

I've been asked this before, but did not have an answer!  On Unidata -- in a dictionary -- to do a multivalue OCONV, the command is

SUBR("-OCONVS",X,Y)

The question I got asked:  

"Why is there a "-" in front of that code?"

And I was not sure!  Is that because it's a system function?  It's not actually documented as to WHY -- just that it IS.

I just looked over the Using UnIData 8.2.4 doc to make sure it was not something documented.

Anyone know for sure what the "-" infers or confers beyond my guess that is means 'this is a built in system command'?



------------------------------
David Wolverton
Independent
Sunset Programming Inc
Waltham MA US
------------------------------

David,

It does denote for UniData to do something different when it encouters it .

For example you won't find a cataloged program in the catalog space called '-ANDS'  ;-)

Regards,



------------------------------
Jonathan Smith
UniData ATS
Rocket Support
------------------------------

The question we had -- why do all these commands start with a  "-" ??   That's the question we had -- it's the only command that we know of that has this odd indication without any 'reason'.  Our assumption is that the "-" means "this is a built in routine" -- but we didn't have anything telling us that.  It could have just been OCONVS, but it is HYPHEN OCONVS ... why the hyphen?   We were guessing it was how someone back in the 70s and 80s decided to indicate 'these were routines we gave you' -- but no one knew for sure!



------------------------------
David Wolverton
Independent
Sunset Programming Inc
Waltham MA US
------------------------------

By the time this ability came out, there were already end-user created subroutines that did a variety of things.

The "-" was used in order to not conflict with these, so the name would be unique in the system



------------------------------
Will Johnson
Systems Analyst
Rocket Forum Shared Account
------------------------------