×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Looping

Looping

(OP)
I have a .txt file I recieve every four weeks that includes new UPCs and descriptors.  Its been awhile since I have programmed, but I am tired of manually entering this information into our system, so.....
Set it up so that it reads through the data finds the new upc, put the UPC code into a file as a field, and then place everything else into a file as a field until the next new upc code.  The problem is in the Characteristics, not all characteristics are listed for each product.
Here is a snippet of what the .txt file looks like

== NEW UPC #1  UPC CODE = 0-18421-50606  UPCMASK = 0-18421-50606     
     
CHARACTERISTIC    VALUE
PC    7635 - SCHOOL & OFFICE STRGE &
BRAND    ELDON
ITEM    ELD STEP SRT PLS BK
SIZE    1 CT  CT
AVG PRICE    7.99
MULTI    1
BSEDS    ELD STEP SRT PLS BK
BSESZ    1 COUNT
CATGY    HOME & SCHOOL & OFFICE SUPPLY
CCN    STEP SORTER
CMGRP    SCHOOL & OFFICE STRGE & DSPNSR
COLOR    BLACK
DEAL    NON-DEAL
DMLNG    NOT STATED
DMWDT    NOT STATED
IMGCR    NO IMAGE CARRIED
LCTMK    NO LICENSED TRADEMARK
MANUFACTURER    018421 - NEWELL OFFICE PRODUCT
MATSB    PLASTIC
NPSC    NOT STATED
PKGGS    SLEEVE
TAGRS    N/A
USRFI    NOT STATED
INTRODUCED    12/20/2003
OLDEST SALES    06/19/99 - SALES ON F D
     
== NEW UPC #1  UPC CODE = 0-18421-50606  UPCMASK = 0-18421-50606     
 ========== TOTALS IT WILL BE ADDED INTO ==========    
TOTAL ID    DESCRIPTION
B 7635000573    ELDON
S 0000003440    CTG NON-CORE CATEGORY
     
== NEW UPC #2  UPC CODE = 0-21200-52770  UPCMASK = 0-21200-52770     
     
CHARACTERISTIC    VALUE
PC    7635 - SCHOOL & OFFICE STRGE &
BRAND    SCOTCH 3M
ITEM    S3M TP DSP CNV
SIZE    1 CT  CT
AVG PRICE    8.69
MULTI    1
BSEDS    S3M TP DSP CNV
BSESZ    1 COUNT
CATGY    HOME & SCHOOL & OFFICE SUPPLY
CCN    TAPE DISPENSER
CMGRP    SCHOOL & OFFICE STRGE & DSPNSR
COLOR    COLOR NOT VISIBLE
DEAL    NON-DEAL
DMLNG    NOT STATED
DMWDT    NOT STATED
IMGCR    NO IMAGE CARRIED
LCTMK    NO LICENSED TRADEMARK
MANUFACTURER    021200 - 3M (TAPE/ADHES/COATNG
MATSB    NOT STATED
NPSC    NOT STATED
PKGGS    BOX
TAGRS    N/A
USRFI    NOT STATED
INTRODUCED    12/20/2003
OLDEST SALES    10/11/03 - SALES ON F   M
     
== NEW UPC #2  UPC CODE = 0-21200-52770  UPCMASK = 0-21200-52770     
 ========== TOTALS IT WILL BE ADDED INTO ==========    
TOTAL ID    DESCRIPTION
B 7635001514    3M
S 0000003440    CTG NON-CORE CATEGORY
     
== NEW UPC #3  UPC CODE = 0-21942-74011  UPCMASK = 0-25932-75011     

I need some help in getting the code worked out.........thanks!    

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close