Reply To: TCL PROC for X12 transaction

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf TCL PROC for X12 transaction Reply To: TCL PROC for X12 transaction

#56524
Anonymous
Participant

Hi Alise,

The error could be in these lines:

set splitSeg [split $seg *]

set Fld1 [string range $splitSeg 0 1]

The split is ok but you’re creating a list of fields where the first field is actually the segment ID or “CAS”.  So when you get the first two characters you get “CA” instead of what you expect.  

Instead of using ‘string range’ use lindex and get the second element which should be the field that “CO” is in.

So:

set Fld1 [lindex $splitSeg 1]

Forum Statistics

Registered Users
5,116
Forums
28
Topics
9,292
Replies
34,432
Topic Tags
286
Empty Topic Tags
10