I have a complex I-Descriptor that should never output more than 2 characters. Therefor, I have it set to "2L".
Due to some bad data, a few records have 5-6 characters for this value.
How can I direct the dictionary item to only out 2 chars?
------------------------------
Nelson Schroth
president
C3CompleteShop LLC
Harrison OH US
------------------------------
I have a complex I-Descriptor that should never output more than 2 characters. Therefor, I have it set to "2L".
Due to some bad data, a few records have 5-6 characters for this value.
How can I direct the dictionary item to only out 2 chars?
------------------------------
Nelson Schroth
president
C3CompleteShop LLC
Harrison OH US
------------------------------
On Unidata, the following will return the first two characters of the result of S.GET.LAST.NAME:
SUBR("S.GET.LAST.NAME", PER.ID);@1[1,2]
------------------------------
Shawn Waldie
enterprise application developer
Rocket Forum Shared Account
Los Angeles CA US
------------------------------
On Unidata, the following will return the first two characters of the result of S.GET.LAST.NAME:
SUBR("S.GET.LAST.NAME", PER.ID);@1[1,2]
------------------------------
Shawn Waldie
enterprise application developer
Rocket Forum Shared Account
Los Angeles CA US
------------------------------
Thanks Shawn - I was hoping to solve within the I-descritpor, but SUBR is always a choice.
------------------------------
Nelson Schroth
president
C3CompleteShop LLC
Harrison OH US
------------------------------
I have a complex I-Descriptor that should never output more than 2 characters. Therefor, I have it set to "2L".
Due to some bad data, a few records have 5-6 characters for this value.
How can I direct the dictionary item to only out 2 chars?
------------------------------
Nelson Schroth
president
C3CompleteShop LLC
Harrison OH US
------------------------------
Depending on the nature of the I-descriptor expression, I was going to suggest the same as Shawn. It shouldn't matter if it is a SUBR expression or not. But just adding the [1,2] to the end of the final value should only display the first 2 characters of the result.
------------------------------
Neil Morris
Universe Advanced Technical Support
Rocket Software
------------------------------
Thanks Shawn - I was hoping to solve within the I-descritpor, but SUBR is always a choice.
------------------------------
Nelson Schroth
president
C3CompleteShop LLC
Harrison OH US
------------------------------
I was only using the S.GET.LAST.NAME subroutine as an example.
The important part is the "[1,2]" (as @Neil Morris mentioned).
------------------------------
Shawn Waldie
enterprise application developer
Rocket Forum Shared Account
Los Angeles CA US
------------------------------
On Unidata, the following will return the first two characters of the result of S.GET.LAST.NAME:
SUBR("S.GET.LAST.NAME", PER.ID);@1[1,2]
------------------------------
Shawn Waldie
enterprise application developer
Rocket Forum Shared Account
Los Angeles CA US
------------------------------
Best approach is to fix the data. You can even use a before trigger to make sure the data is the correct format.
You could just use masking in your format, "2L##".
------------------------------
David Green
Computer Programmer
Rocket Forum Shared Account
------------------------------
Best approach is to fix the data. You can even use a before trigger to make sure the data is the correct format.
You could just use masking in your format, "2L##".
------------------------------
David Green
Computer Programmer
Rocket Forum Shared Account
------------------------------
Thanks David! that worked like a charm.
One of my co-workers wondered about using this on a linger field, say 20...would you need to use 20l################### or is there a shorthand like MATCH uses for such things, like 20L20(A) (which by the way outputs only the "A" :-)
------------------------------
Nelson Schroth
president
C3CompleteShop LLC
Harrison OH US
------------------------------
Thanks David! that worked like a charm.
One of my co-workers wondered about using this on a linger field, say 20...would you need to use 20l################### or is there a shorthand like MATCH uses for such things, like 20L20(A) (which by the way outputs only the "A" :-)
------------------------------
Nelson Schroth
president
C3CompleteShop LLC
Harrison OH US
------------------------------
Yes there is a shorthand version.
20L#20 Would do 20 # signs.
------------------------------
David Green
Computer Programmer
Rocket Forum Shared Account
------------------------------
Depending on the nature of the I-descriptor expression, I was going to suggest the same as Shawn. It shouldn't matter if it is a SUBR expression or not. But just adding the [1,2] to the end of the final value should only display the first 2 characters of the result.
------------------------------
Neil Morris
Universe Advanced Technical Support
Rocket Software
------------------------------
We have noticed that the 20L#20 works fine for "D" type dict items, but not for "A" type.
Is there an equivilent for that?
Example:
0001: A
0002: 07
0003: DESCRIPTION
0004:
0005:
0006:
0007:
0008:
0009: L
0010: 31
0011: 1
------------------------------
Nelson Schroth
president
C3CompleteShop LLC
Harrison OH US
------------------------------
We have noticed that the 20L#20 works fine for "D" type dict items, but not for "A" type.
Is there an equivilent for that?
Example:
0001: A
0002: 07
0003: DESCRIPTION
0004:
0005:
0006:
0007:
0008:
0009: L
0010: 31
0011: 1
------------------------------
Nelson Schroth
president
C3CompleteShop LLC
Harrison OH US
------------------------------
Hi Nelson,
In field 7 put T1,20
In field 8 put C;1;####################
There might be other ways, but that's the first that comes to mind.
------------------------------
Tyrel Marak
Technical Support Manager
Aptron Corporation
Florham Park NJ US
------------------------------