[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Function returns a FLOAT



Title: RE: Function returns a FLOAT

I have received several suggestions on using the unstring command.  I may do this but my problem is this file will vary all the time.  One time I could unstring into 20 variables the next time I will need to unstring into 2000.  I am receiving an EDI 210 file that will have multiple invoices on 1 line.  That is what makes my file change in length.  I will never know how long or how many invoices I will receive.  Has any one programmed for a 210 or anything that will change constantly?

-----Original Message-----
From: bngo@ALDOGROUP.COM [mailto:bngo@ALDOGROUP.COM]
Sent: Monday, May 01, 2000 3:07 PM
To: SQR-USERS@list.iex.net
Subject: Re: Function returns a FLOAT




Hi Amy,

     Why you don't to try the command unstring here is the example
    unstring $data_row by ',' into $col1
                                   $col2
                                   $col3
                                   $col4
                                   $col5
                                   $col6
                                   $col7
                                   $col8
                                   $col9
                                   $col10
                                   $col11
                                   $col12
                                   $col13
                                   $col14
                                   $col15
                                   $col16
                                   $col17
                                   $col18
                                   $col19
                                   $col20
                                   $col21
                                   $col22
                                   $col23
                                   $col24
                                   $col25
                                   $col26
                                   $col27
                                   $col28




"Sablatura, Amy" <Amy.Sablatura@IMPERIALSUGAR.COM> on 05/01/2000 03:28:33
PM

Please respond to sqr-users@list.iex.net

To:   SQR-USERS@list.iex.net
cc:    (bcc: Bao Ngo/Le Groupe Aldo)
Subject:  Function returns a FLOAT




I have a file I am trying to read that is 1 long line.  The length of this
line will vary all the time.  It is actually a 210 file.  I wanted to read
the file and write a new file with a new row for each identifier.  The end
of each new identifier row has a carrot - '^'.  I tried using the FIND or
INSTR function but both of these functions died after I got to the 1000th
position because they return a FLOAT.  Is there any other function I can
try
or do you have any suggestions?  My file I am trying to read is usually
over
20000 characters in length.  I tried the declare-variable but it didn't do
anything for me.  Below is my code.  Any help is greatly appreciated.





  While #count <> 0

      let #end_pos   = instr($CHR-Data,'^',#start_pos)
!      FIND '^' IN $CHR-Data #start_pos #end_pos
      let #start_pos = #end_pos + 1

      write 2 from $Line_Data

      If #end_pos = 0
          let #count = 0
      end-if


  end-while




Amy Sablatura
281/490-9546
asablatura@imperialsugar.com