Giter Club home page Giter Club logo

dds-to-ddl's Introduction

dds-to-ddl

Convert a DDS file into SQL Table and creates surrogate files.

It won't be 100% all of the time, but should get you 80% of the way there 80% of the time. This is intended to be a helper, not a flawless converter that you mindlessly run. Do not use this if you don't know what you're doing.

Usage

  1. Clone the repo

    • git clone https://github.com/oceanskunk/dds-to-ddl.git
  2. Compile the programs

    • CRTSQLRPGI OBJ(<your library>/CVTDDS) SRCSTMF('/home/<USER>/dds-to-ddl/qrpglesrc/CVTDDS.SQLRPGLE')
    • CRTSQLRPGI OBJ(<your library>/CRTDDS) SRCSTMF('/home/<USER>/dds-to-ddl/qrpglesrc/CRTDDS.SQLRPGLE')
  3. Call CVTDDS first

    • CALL PGM(CVTDDS) PARM('LIBRARY' 'FILENAME' 'SQLTABLE')
      • LIBRARY and FILENAME should point to the existing PF
      • SQLTABLE is the name for the new SQL table
    • This will generate DDL for your new SQL table.
    • Review the source in QTEMP/QSQLSRC.
    • RUNSQLSTM to create the new table.
  4. Call CRTDDS next

    • CALL PGM(CRTDDS) PARM('LIBRARY' 'FILENAME' 'SQLTABLE')
      • LIBRARY and FILENAME should point to the existing PF
      • SQLTABLE is the name for the new SQL table
    • This will generate DDS for new versions of the existing files.
    • The PF will be converted into a LF.
    • All existing LFs will be based on the new SQL table.
    • Review all the source in QTEMP/QSQLSRC (yes, the DDS is in QSQLSRC).

DO NOT COMPILE ANYTHING YET

  1. Copy your data from the PF into the new table

    • You will need *MAP *DROP
  2. Now you can compile the DDS

Limitations

  • Does not handle multi-format files.
  • Does not (yet) handle select/omit.
  • Probably many others...

dds-to-ddl's People

Contributors

p-behr avatar pbehr-cambro avatar

Stargazers

Marius avatar

Forkers

itmentalist

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.