Clovertech
› Clovertech Forums › Read Only Archives › Cloverleaf › Cloverleaf › rearrange billing flat file in TCL
Ok here goes—
Here is an example of what flat file looks like (each line term with a NL)
4201034600051 1212104039140 001 [code] 4201034600051 1212104039140 001
4201034600051 1212104039140 001
Gary,
Are you wanting to do this in an Xlate?
If so, I would think that some of the lifting can be done by using the FRL for more than just specifying the individual fields.
Then some Tables might be in order (depending on the dynamics involved).
The IF Action will come into play as well as SUPPRESS, etc.
And finally maybe some minor Tcl.
email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 61 years IT – old fart.
Lay this out in an FRL, naming each field then state the requirements. It would make more sense that way.
As Jim says, if you can you need to use FRL, because flat file layouts can change and blow the Tcl out of the water
Be careful on file names like: YYYYMMDDHHMMSS.MISCHG
The engine can process more than one record per second and you *WILL* lose data. Combine with a counter.
I have used FRL in the pass with flat files, but in this specific case. Doesn’t the translation parse out one line of flat file at a time? How do account for looking at multiple lines in determining what the billing code should be?
I am just saying define as an FRLfor ease of understanding. Then you can name each field and describe the problem much better.
An FRL can be passed as a file (eof). Not sure how easy it would be to translate.
I was just trying to wrap my arms around what he is trying to accomplish
FRL is attached.
That helps but still a bit confused
Are these 7 lines considered one record? Will there always be 7?
The part about adding and deleting lines is still very confusing to me.
Of course, I am easily confused 😕
Each line is a record.