• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

[HELPED] AutoCode- File is not keyed

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

  • [HELPED] AutoCode- File is not keyed

    I am just getting started with Valence. I've only had it for a couple of days, but i'm trying to create an AUTOCODE FileMaintenance program. I'm trying to use a file that is created by DDL and uses Identity column as the key, but autocode says its not keyed and can only create an inquiry program.

    Any idea why this is happening and how to resolve it?

    Thanks

    Mike

    DDL is

    CREATE TABLE TAPEINV00
    (TIID INT GENERATED ALWAYS AS IDENTITY
    (START WITH 1 INCREMENT BY 1) PRIMARY KEY,
    TISYSTEM CHAR ( 10) CCSID 37 WITH DEFAULT NUL
    TILABEL CHAR (10 ) NOT NULL WITH DEFAULT,
    TISEQ DEC( 2, 0) NOT NULL WITH DEFAULT,
    TILOCATE CHAR (10 ) NOT NULL WITH DEFAULT,
    TITAPEDATE DEC (8 , 0) NOT NULL WITH DEFAULT,
    TISTATUS CHAR (10) NOT NULL WITH DEFAULT,
    TINOTES CHAR (50) NOT NULL WITH DEFAULT,
    TIPONUM DEC (7,0) NOT NULL WITH DEFAULT,
    TISERIAL CHAR (20 ) NOT NULL WITH DEFAULT,
    TIINSRVDTE DEC (8,0 ) NOT NULL WITH DEFAULT,
    TITRNDATE DEC (8,0 ) NOT NULL WITH DEFAULT,
    TIEXPDATE DEC (8,0 ) NOT NULL WITH DEFAULT,
    TISCRPDATE DEC (8,0 ) NOT NULL WITH DEFAULT,
    TILBLWGHT DEC (2,0) NOT NULL WITH DEFAULT);

  • #2
    Hi Mike,

    I should preface this answer by saying that the AutoCode app is a bit deprecated -- it's just a quick & dirty way to create a very basic CRUD-type app over a single database file for example purposes. The front-end JavaScript that AutoCode creates pre-dates the more modern MVC coding format that Ext JS 4 encourages.

    Having said that, I used your SQL code to create an identical table on our box running V7R1 and didn't get that message about it not being a keyed file. Which OS are you running? I suspect the problem could be in the QDBRTVFD API that AutoCode uses to determine the key field info.

    I should note that I still had trouble generating the app because AutoCode constructs RPG code that uses native I/O to add/update records, and it assumes the record format name is different from the file name. That isn't the case here, so I had to modify the RPG code to rename the file format in the F spec in order for it to compile. AutoCode also assumes each field has a "text" definition, which isn't the case here so the front-end is missing labels.

    I'll add this to our list of things to possibly look at for Valence 4.0 (though we may be replacing AutoCode altogether). Rather than using AutoCode I would encourage you to try to learn more about the front-end Ext JS / JavaScript code by looking at the examples, particularly the Help Desk demo apps. You'll be able to create much more impressive apps that way.

    Rob

    Comment


    • #3
      AutoCode-File is not keyed

      Rob
      Thanks for the reply.
      I am running on V7R1 also.
      I did know that Autocode is deprecated, but i didn't see any thing in the NITRO APP builder that created a Full File Maintenance Application. I certainly could have easily missed it though. It seems like you can build a grid, but i didn't see how to do the maintenance.

      You know the really odd thing(I think the following is true, but i'm getting old and senile.) is that i think the first time i tried this it actually took the file ok, but i had compile errors and didn't get it quite working. I tried a few other things and came back to this and then i started getting that error.

      Originally posted by robert.swanson View Post
      Hi Mike,

      I should preface this answer by saying that the AutoCode app is a bit deprecated -- it's just a quick & dirty way to create a very basic CRUD-type app over a single database file for example purposes. The front-end JavaScript that AutoCode creates pre-dates the more modern MVC coding format that Ext JS 4 encourages.

      Having said that, I used your SQL code to create an identical table on our box running V7R1 and didn't get that message about it not being a keyed file. Which OS are you running? I suspect the problem could be in the QDBRTVFD API that AutoCode uses to determine the key field info.

      I should note that I still had trouble generating the app because AutoCode constructs RPG code that uses native I/O to add/update records, and it assumes the record format name is different from the file name. That isn't the case here, so I had to modify the RPG code to rename the file format in the F spec in order for it to compile. AutoCode also assumes each field has a "text" definition, which isn't the case here so the front-end is missing labels.

      I'll add this to our list of things to possibly look at for Valence 4.0 (though we may be replacing AutoCode altogether). Rather than using AutoCode I would encourage you to try to learn more about the front-end Ext JS / JavaScript code by looking at the examples, particularly the Help Desk demo apps. You'll be able to create much more impressive apps that way.

      Rob
      Rob

      Comment

      Working...
      X