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

RE: [sqr-users] How do you make a file error when trying to open it?



See #2.  They were meant as two separate suggestions.

-----Original Message-----
From: Katchur, Ken SS [mailto:Ken.Katchur@govmail.gov.sk.ca]
Sent: Tuesday, March 11, 2003 3:31 PM
To: sqr-users@sqrug.org
Subject: RE: [sqr-users] How do you make a file error when trying to
open it?




        I forgot to mention I need the file to exist and then have a problem
opening it.

                    Thanks Ken



        From:   "Schelske, Steve K." <SKSchelske@aaamichigan.com> on
03/11/2003 02:26 PM
        Please respond to sqr-users@sqrug.org@SMTP@Exchange
        To:     sqr-users@sqrug.org@SMTP@Exchange
        cc:      
        Subject:        RE: [sqr-users] How do you make a file error when
trying to open  it?

        1)Rename the file so that it is not found when you try to open it.

        2)Change permissions on the file or directory so that the id running
SQR
        does not have access to the file.

        I'm sure you'll get lots of other suggestions as well.

        -----Original Message-----
        From: Katchur, Ken SS [mailto:Ken.Katchur@govmail.gov.sk.ca]
        Sent: Tuesday, March 11, 2003 3:17 PM
        To: sqr-users@sqrug.org
        Subject: [sqr-users] How do you make a file error when trying to
open
        it?


        Thanks in advance


        In my sqr I have  some code that checks if a file had an error while
        opening?  How can I test this, make a file error while trying to
open it?
        Any advise is welcome!!


            open $file as 1 for-reading record=139:vary status = #fstat1

            if #fstat1 <> 0
              let $filerror = '*** Error opening ACI file ' || $file || '
***'
              let $aci-file-opening-error = 'Y'  
              if #prcs_process_instance = 0

                 input $answer '*** Error opening ACI file ***'

              end-if
              do print-error
        !      do Closing-Process
              let #Ret_Code = #fstat1
              do Update-App-Error
              stop
            end-if
          end-if

                                                                   
                                                                Thanks Ken

        _______________________________________________
        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