Skip to content

Broken Conversion #1

@Zeda

Description

@Zeda

These are some conversions that are either missing or broken:

  • open <filename> as <file> and write <file> from are broken, especially with the file parameter.
    • remedy: Just figure out where the file string is being mangled
  • evaluate is not converted
    • remedy: Easy way is to just convert to IF/ELSIF/ELSIF/ELSE/END IF
  • write is often not converted to a utl_file.put_line( statement
    • No idea, probably forgot some code
  • print is not at all supported.
    • This will require helper routines and more complicated analysis of the program.
    • I have a PL/SQL function (f_overstr(in, str, col[,width]) that let's you overwrite a section of a string with a substring and that helps immensely, but that doesn't help with the more complicated print breaks (these execute a function/procedure when when a given variable's value changes, then prints a heading and executes another function/procedure).
  • display commands should translate to DBMS_OUTPUT.PUT() and DBMS_OUTPUT.PUT_LINE().
  • In SQR, you can have a SQL SELECT query and directly reference the columns in other scopes. This doesn't work in PL/SQL, so conversion should try to locate which query a given &my_col came from and assign the value to a global var.
  • move just assumes that it is formatting to a string and that it is a valid to_char() format. It should at the very least detect the type of the conversion.
  • Conditions that span multiple lines, like in Ifstatements will not convert properly.
    • Remedy: A basic expression parser to figure out when the condition is finished.
  • Conditions with comments on the same line will append the THEN or LOOP to the end of the comment.
    • Remedy: insert before the comment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions