ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Exit Point Program for i Access for Windows

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Exit Point Program for i Access for Windows

    We are trying to limit users that are using iAccess for Windows (Client Access) from using the file transfer capabilities. We would like to do this via exit point QIBM_QZDA_INIT. We have created a CL that does fire off at the appropriate time. We get CWBTF.EXE in the interface type portion of the passed parameter. We would like to limit some users to only "Receive file from host" and others to have both "Send" and "Receive". Is there a way to determine this using the exit point parameter data? This is our first jump into this and we need all the help we can get!

    Thanks!!!!

  • #2
    The INIT exit point would only be useful to determine if the users were allowed to make a connection to the database. In order to handle the requests for send/receive, you'll need to use the QIBM_QZDA_SQL2 exit point and look at the function value. (You could use the _SQL1 exit point, but _SQL2 will probably be better in the long run even if _SQL1 works for everything done today.) A 'Receive' request will likely cause function value X'0000180C'. A 'Send' request should give function values X'00001803' and X'00001805'.

    Be aware that other processes might give other function values, so take care both in what your exit program 'Allows' and what it 'Rejects' and what user or remote address it does either one for. It's easy to allow things that shouldn't happen as well as to reject actions that need to be done. It's often not so easy to build up a picture of which is which.
    Tom

    There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

    Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

    Comment


    • #3
      Would Work with Function Usage work for you? (WRKFCNUSG)

      Cheers,

      Emmanuel

      Comment


      • #4
        I'm now using QIBM_QZDA_SQL2 but I'm receiving the X'180C' function id for a receive file FROM host and send file TO host. I want to allow selected users to receive data using client access/i access for windows but NOT allow the send data function.

        Am I doing something wrong here?

        Thanks!!!!!

        Comment


        • #5
          A x'180C' can show for numerous connections if any info such as a list of tables is retrieved (fetched) from the server. The list is little other than a result of a simple 'Receive' operation, just like retrieving the contents of a database table. Whether or not other function values show later during the operation can depend on exactly what is done and even on what tools are used on the client.

          Here, I have System i Access 6.1, so the emulator is PCComm 5.9. Whether I use Send/Receive from the emulator menu bar or I directly open a Data Transfer function through the PC Start menu, I get the results noted above. It seems unlikely that only a "fetch" function value would arise from a 'send to server' operation, so more details on the exact sequence you run.

          Can you elaborate?
          Tom

          There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

          Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

          Comment


          • #6
            Tom,

            1. I'm in emulation mode and click on actions
            2. I then select either "Receive file from host" or "Send file to host"
            3. Select the databases I'm sending to or receiving from and the targets
            4. I then click OK.

            All I have the exit program doing right now is writing the passed parameter out to a database file so I can see what function is being sent to the program. On either selection (receive or send) I get X'180C' as the function.

            Does this make sense?

            Thanks!!!!

            **** EDIT EDIT EDIT ****

            I think I see what I need to do. Check for certain actions in the SQL statement parameter. INSERT, DELETE, UPDATE, etc. I think that will accomplish what I need.

            But another quick question: when exactly is this exit program called? I can tell it is not any time an SQL statement is run. When exactly does it fire off?

            Thanks so much for your help!!!!!

            Comment


            • #7
              The iAccess send/receive processs uses SQL for more than just uploading/downloading data. When you press the Browse button to select a file, it issues SQL statements to build the library, file, member lists. I believe several different function IDs will be used for its processing. As you suggest, it might be easier to scan the SQL statement to determine what's being done.

              Comment

              Working...
              X