- This topic has 5 replies, 2 voices, and was last updated 13 years, 4 months ago by .
-
Topic
-
We are working with a GL Issues file. We need to strip the leading zero from ZJD3, then compare the first 4 numbers against a list provide. If those first 4 numbers match any number in the list, then we replace them with the numbers in the list, and concatonate the remaining 4 numbers to the new number. Example:
Portion of file:
ZJD||D|016113550|GLOVES||||||””^””||
ZJD||D|016123500|EXPENDABLE SUPPLIES||||||””^””||
ZJD||D|016123800|DRESSINGS||||||””^””||
ZJD||D|016124600|OFFICE SUPPLIES||||||””^””||
ZJD||D|017373600|MEDICAL SURGICAL SUPPLIES||||||””^””||
Numbers to search for – Numbers to replace if there is a match
1611 6000
1116 8000
1737 9000
So in the first ZJD line above we strip the leading zero, there is a match on ‘1611’, so we replace 1611 with 6000 and concatonate that to the last four numbers ‘3550’. The result will look like: 60003550.
Does anyone have a script they are using that will do something like this, or is there someone that could offer some suggestions.
We are running Cloverleaf 5.8 on a Linux platform.
Any help is greatly appreciated.
- The forum ‘Cloverleaf’ is closed to new topics and replies.