Jim ...here is a snippet of how to do it. 
Data is from a Badger Meter Reading system.
 
   ---   DELETE ROS FROM HOLDING TABLE   DELETE ROWS FROM BADGER_INPUT
   IF VF_ERROR = 2038 THEN      BEEP 'FREQ 200,150'      PAUSE 2 USING +      ' 
INPUT HOLDING TABLE (IMPORT_HH) IS MISSING - NOTIFY SUPPORT ! '+      CAPTION ' 
INFORMATION MESSAGE ' ICON ERROR      GOTO ABEND   ENDIF   
---------------------------------------------------   
---------------------------------------------------
   LOAD BADGER_INPUT FROM HHUP.CSV AS CSV   ---   CHECK FOR FILE NOT FOUND   IF 
SQLCODE = -2077 THEN      BEEP 'FREQ 200,150'      ---   DEVELOPE THE MESSAGE   
   SET VAR VF_MSG TEXT = +        (' INPUT FILE HHUP.CSV IS NOT PRESENT ! ' ++  
         (CHAR(013)) ++           (CHAR(013)) ++             ' PROCESSING WILL 
TERMINATE !' ++           (CHAR(013))  )      PAUSE 2 USING .VF_MSG +        
CAPTION ' ERROR MESSAGE ' ICON SERIOUS +        OPTION BACK_COLOR WHITE +       
 |MESSAGE_FONT_SIZE 10 +        |MESSAGE_FONT_BOLD ON +        |MESSAGE_COLOR 
WHITE +        |MESSAGE_FONT_COLOR RED      
-----------------------------------------------------      
-----------------------------------------------------        CLOSEWINDOW        
CLEAR VAR VF_%      RETURN   ENDIF   
---------------------------------------------------   ---   GET A COUNT OF THE 
# OF RECORDS LOADED   SET VAR VF_COUNT INT =  000   SELECT COUNT(*)  INTO 
VF_COUNT INDICATOR VG_IND FROM IMPORT_HH   SET VAR VF_COUNT = (.VF_COUNT -1)
   IF VF_COUNT = 0 THEN      BEEP 'FREQ 200,150'      ---   DEVELOPE THE 
MESSAGE      SET VAR VF_MSG TEXT = +        (' THERE WERE NO ACCOUNTS LOADED ! 
' ++           (CHAR(013)) ++           (CHAR(013)) ++             ' PLEASE 
NOTIFY SUPPORT '    ++           (CHAR(013))   ++           (CHAR(013)) ++      
       ' PROCESSING WILL TERMINATE !' ++           (CHAR(013))  )      PAUSE 2 
USING .VF_MSG +        CAPTION ' ERROR MESSAGE ' ICON SERIOUS +        OPTION 
BACK_COLOR WHITE +        |MESSAGE_FONT_SIZE 10 +        |MESSAGE_FONT_BOLD ON 
+        |MESSAGE_COLOR WHITE +        |MESSAGE_FONT_COLOR RED
      -----------------------------------------------------      
-----------------------------------------------------        CLOSEWINDOW        
CLEAR VAR VF_%      RETURN   ENDIF   
---------------------------------------------------
Hope this helps.
Jim Schmitt

    On Sunday, May 10, 2020, 04:10:38 PM EDT, 'Jim Belisle' via RBASE-L 
<[email protected]> wrote:  
 
 
I forgot that it really is not an Excel file. it is a CSV file.
 
I actually thought of that, Bruce, but as you say, it is not elegant, and I was 
hoping I could find somehow to count the CSV file rows without importing.
 
I may need to go that route. 
 
  
 
James Belisle
 
  
 
Making Information Systems People Friendly Since 1990
 

 
  
 
From: [email protected] [mailto:[email protected]]On Behalf Of 
Bruce Chitiea
Sent: Sunday, May 10, 2020 3:06 PM
To: [email protected]
Subject: Re: [RBASE-L] - File import
 
  
 
Perhaps not elegant, but should work
 
  
 
(1) Print the Excel file to a .TXT file
 
(2) Import/Load .TXT file to a TEMP table
 
(3) Count the number of rows to a variable
 
(4) If count value is <2, don't GATEWAY
 
  
 
Bruce
 
  
 
Bruce A. Chitiea
 
SafeSectors, Inc.
 
112 Harvard Ave #272
 
Claremont CA 91711-4716
 
[email protected]
 
(909) 238-9012 c
 
  
 
  
 
------ Original Message ------
 
From: "'Jim Belisle' via RBASE-L" <[email protected]>
 
To: "[email protected]" <[email protected]>
 
Sent: 5/10/2020 12:59:33 PM
 
Subject: [RBASE-L] - File import
 
  
 

I am trying to work with our web administrator in bringing order information 
into RBASE using FTP.
 
The FTP syncornizer creates an Excel file from the web then send that Excel 
file to our server. I then create code that brings that file information into 
RBASE using GATEWAY.
 
 
 
Here is the glitch. On the web side, the automated sync downloading the Excel 
file fires even if there is no info to send to us. That means I end up with a 
file that has a header row but no actual information to import.
 
My GATEWAY just hangs up if there is no actual info to import.
 
So my question. Is there some code or GATEWAY setting that can check an Excel 
file for info so it will not import?
 
My web man says he cannot set up the FTP to NOT send files (if no info 
available) if it is automated to sync with my server at set times.   
 
 
 
The only other option is for the web to export to our server all the web 
traffic every time. That eventually will get to be a BIG file if our web 
traffic increases as we wish.
 
 
 
Can anyone think of anything I can do on the RBASE end? 
 
 
 
James Belisle
 
 
 
Making Information Systems People Friendly Since 1990
 

 
 
 

-- 
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php
--- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
[email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rbase-l/CY4PR0201MB3394AF530E44BBE904A88D2DA0A00%40CY4PR0201MB3394.namprd02.prod.outlook.com.


 

-- 
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php
--- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rbase-l/CY4PR0201MB3394BA7C394ED7A031730B3DA0A00%40CY4PR0201MB3394.namprd02.prod.outlook.com.
  

-- 
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php
--- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rbase-l/1369389204.1132095.1589157434621%40mail.yahoo.com.

Reply via email to