(1)UNA,UNB,UNG,UNH,UCI,UNT,UNZ are segments
' is a segment seperator
+ is an element seperator
: is a sub-element seperator
The + and : will vary.
Like the element seperator may be + or ~ or ! etc, similarly the sub-element seperator.
But there will be another record called UNA which comes before this UCI will indicate which is the segment seperator, which is the element seperator, which is the sub-element seperator.
UCI-01 : 000000022 can be a maximum of 14 characters and the min length is 1.
UCI-02 : 5102262552 can be a maximum of 35 characters and the min length is 1.
UCI-02-01: 12 will have a fixed length of 2 characters.
UCI-03 : EED1 NYIE115 will be varying from 1 to 35.
UCI-03-01: ZZ is fixed 2 character length
UCI-04 is a varying alphanumeric data from 1 to 3 length according to the standard, but i'm sure that we are receiving only either a 7 or 4
( single length numeric)
I have to fetch UCI-04 for further processing. Depending on UCI-04, i will be determing this record is valid or not.
(1)With these variable length elements in the UCI segment, im not sure how i can fetch the UCI-04 element.
(2)I'm thinking of depending on the UNA first by taking which is the segment seperator, then
(3)when the record begins with UCI,read this entire UCI record into an array, then running the array till it reaches the segment seperator.
(4)As always the UCI-04 is the last element in that record, i can fetch the UCI-04 just before the segment seperator, but how can i stop that array fetching is again a question, because there are few more segments after this UCI which also will have same segment seperator.
Could anyone throw some light on how to achieve this....