Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2007
    Posts
    1

    Conversion of data & associated logic from ISAM to RDB

    This is my first post to dBforums. Please forgive me if I am not posting this in the right place, but since this matter does involve rdb table-changing via SQL transaction processing then I figured that it might be okay to start it here. If there is a better place, please advise and I will make it happen!

    We are using Micro Focus Net Express 4.0 and Microsoft SQL Server 2000. The concepts/examples we are seeking however can be more generic, i.e., not necessarily shown within COBOL source code per se.

    Right now we have two realized problems, both of which appear to stem from our mutual and still-thriving ignorance......

    The first problem is as follows: We are having surprising difficulty in our attempts to find working examples of SQL-related code sequences for handling low-volume user-entered updates vs large-volume batch updates. The working examples we need can be represented as pseudo-code and/or actual code – we don’t really care which – we just need something representative to work from. (See fictitious example enclosed)

    The second problem involves how to handle record locking issues among multiple users. The lead analyst wants us to code logic that requires maintenance of a date-time field in every record – this date-time stamp would then be used for determining the availability of a given record such that unilaterally-applied changes are not given an opportunity to sneak in while another user has said record in a state of flux. I’ll spare you the further gory details of this terrifying scheme for now, but suffice it to say we do not like it because it seems that we would end up re-inventing the wheel, given that the rdb is supposed to have various locking detection/tools already built into it.

    Here is a simple/fictitious representation of the type of code sequence samples that we are looking for...

    Typical LOW-VOLUME USER UPDATE module:
    1. Open rdb
    2. EXEC SQL WHENEVER SQLERROR DO sql_error;
    3. Accept record key from user
    4. Read matching record w/ shared lock (presume REC-FOUND for this example)
    5. Display fields on screen
    6. Accept field updates from user
    7. Edit field updates (presume EDIT-PASSED for this example)
    8. BEGIN TRANSACTION
    9. Read record from table with exclusive lock
    10. Move new field values to table
    11. Rewrite table record
    12. COMMIT
    13. END TRANSACTION
    14. Close rdb


    Typical HIGH-VOLUME BATCH UPDATE module:
    1. Open rdb
    2. ~?~?~
    3. ~?~?~
    4. ~?~?~


    Perhaps there is a site somewhere that includes sql-related coding examples? I appreciate in advance any input that anyone may have about how we should be approaching this data conversion effort.

    Sincerely,
    Dave Miner

  2. #2
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848
    it appears that Micro Focus Net Express uses ado.net to interface to SQL server.

    ADO.Net fully supports SQL Server's record locking natively - you should just have to set ado.net's properties to enforce table or row level record locking, and no client application-based locking is either waranted (or desired.)

    review ado.net documentation at MSDN
    Lou
    使大吃一惊
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •