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

RE: [sqr-users] Read Multiple Delimiters



How about:

let #found_chr = instr($in_rec, $delim1, #search_start)
if #found_chr = 0
  let #found_chr = instr($in_rec, $delim2, #search_start)
end-if

Or, since each file is going to have all one delimiter or the other, search
for each delimiter once, with the first record, and set $delim to the
delimiter that is actually there.

-----Original Message-----
From: Scott.Munson@Metavante.com [mailto:Scott.Munson@Metavante.com]
Sent: Monday, March 03, 2003 9:05 AM
To: sqr-users@sqrug.org
Subject: RE: [sqr-users] Read Multiple Delimiters


You would think so, but the mainframe sees them as being different.

Scott Munson





"Knapp, Richard" <KnappR@umsystem.edu>
Sent by: sqr-users-admin@sqrug.org
03/03/2003 10:55 AM
Please respond to sqr-users

 
        To:     <sqr-users@sqrug.org>
        cc: 
        Subject:        RE: [sqr-users] Read Multiple Delimiters



Aren't those the same character, ie don't they have the same ASCII decimal 
value?

Richard Knapp
Database Programmer/Analyst
Institutional Research and Planning
University of Missouri System
573-882-8856
knappr@umsystem.edu


-----Original Message-----
From: Scott.Munson@Metavante.com [mailto:Scott.Munson@Metavante.com]
Sent: Monday, March 03, 2003 10:47 AM
To: sqr-users@sqrug.org
Subject: [sqr-users] Read Multiple Delimiters


I need to read from a delimited file which will use 2 character forms, | 
and ¦, depending on the system sending the file.  Currently, I have my 
program set up to use an InStr function to look for the | character. 

   -->     let #found_chr = instr($in_rec, '|' ,#search_start)

Yet, should I receive a file containing the other character (¦), it will 
scroll through the entire file without extracting the data.

Is it possible to setup an InStr-like function where it will look for 2 
different characters rather than just the one?


Thanks,
Scott Munson

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users


_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users