Report - All Files

Functions of type eReportFunctionAll check all selected files together and report what they find; they make no changes to the source code. Each one writes its results to a log file, which you open with Tools > Logs > Other Log Files.
CharacterModeInventoryReport
Reports only. Makes no changes to the source code.
Lists what a DataFlex character-mode program contains that has no equivalent in DataFlex 26: screen images (/name ... /*), screen and keyboard commands (Page, Accept, Entry, Gotoxy ...), user interface objects (Entry_Form, Entry_List, Menu, Query ...) and Keyproc handlers, for each file, with totals.
Those parts must be rewritten by hand; the rest of the code can be modernized with DFRefactor.
The results are written to a log file; open it with Tools > Logs > Other Log Files.
Group: Modernization
FunctionReturnMismatchReport
Reports only. Makes no changes to the source code.
Finds the declarations behind error 4544 in DataFlex 25 and 26: one message name that is declared with more than one return type.
It lists every declaration of each such name, both in the workspace and in the target DataFlex, so that you can fix the few declarations that cause the error, instead of the hundreds of calls that it reports.
Names whose declarations are all marked Overloaded are listed separately, and are not counted: DataFlex chooses between them by the number of parameters, so several return types are valid, and neither 4544 fix is needed.
The results are written to a log file; open it with Tools > Logs > Other Log Files.
Group: Modernization
GosubGotoReport
Reports only. Makes no changes to the source code.
Lists every legacy Gosub subroutine (labels, calls, Gosub_Return lines and ON..GOSUB statements), and for each subroutine says whether it can be converted to a procedure (CANDIDATE) or must be changed by hand (MANUAL), and why.
Each Goto gets a hint for how to rewrite it: a jump forward becomes an If/Else block, a jump backward becomes a While or Repeat loop, and a jump out of a block must be untangled first.
The results are written to a log file; open it with Tools > Logs > Other Log Files.
Group: Modernization
Fixes compiler message(s): 4533
LegacyDbApiReport
Reports only. Makes no changes to the source code.
Lists the legacy database attribute commands (File_Size, Size_of_Field, Get_Current_Lockcount, Get_date_format, Get_number_format, Get_filelist, Set_filelist, Get_Date_Attribute and Ifchange), and for each line names the modern Get_Attribute or Set_Attribute replacement.
These lines must be migrated by hand, because they have several forms, change the structure of the code, or are ambiguous, so nothing is changed here. Get_date_format has its own converter, ChangeGetDateFormatToAttribute.
The results are written to a log file; open it with Tools > Logs > Other Log Files.
Group: Modernization
LegacyDfPathReport
Reports only. Makes no changes to the source code.
Lists the obsolete Set_dfpath command, which replaced the whole DFPATH and was used in character mode, and for each line explains the modern cWorkspace alternative: remove the line (the paths come from the .ws configuration), add a folder to psSystemDfPath, or, rarely, Set psDfPath to replace the whole path, which also removes the system folders.
Each line needs its own decision, not a simple replacement, so nothing is changed.
The results are written to a log file; open it with Tools > Logs > Other Log Files.
Group: Modernization
LegacyFieldOptionsReport
Reports only. Makes no changes to the source code.
Lists the character-mode field options (autofind, capslock, displayonly, findreq, forceput, noenter, noput, skipfound, retainall, zero_suppress and autofind_ge), and for each line names the modern Field_Options setting in the data dictionary.
The modern setting belongs in the data dictionary class, which is a change in another file, so nothing is changed.
The results are written to a log file; open it with Tools > Logs > Other Log Files.
Group: Modernization
LegacyRegistryReport
Reports only. Makes no changes to the source code.
Lists the legacy commands for the Windows registry, profile strings and INI files (Reg_Open_Key, Reg_Enum_Value, Get/Set_Profile_String, Get/Set_Registry_Root, Read_dfini ...), and for each line names the modern class to use: cRegistry, or cIniFile for Read_dfini.
cRegistry works with objects, not with the legacy handles and callbacks, so these lines must be changed by hand.
The results are written to a log file; open it with Tools > Logs > Other Log Files.
Group: Modernization
LegacySqlReport
Reports only. Makes no changes to the source code.
Lists the legacy embedded SQL commands (SQLConnect, SQLOpen, SQLPrepare, SQLExecute, SQLFetch, SQLGetData, CLI_*Attribute, DB2/MSSQL_SetConstraint ...), and for each line names the modern cSQL class and method (cSQLHandleManager, cSQLConnection or cSQLStatement).
The modern classes work with objects that keep their own state, so this is not a simple replacement of words, and nothing is changed.
The results are written to a log file; open it with Tools > Logs > Other Log Files.
Group: Modernization
ShadowedPackageFilesReport
Reports only. Makes no changes to the source code.
Lists package files that exist in more than one place in the workspace, and shows which copy the compiler actually used and which copies it did not use.
The compiler never sees a copy that it does not use, so the program compiles without errors against the wrong file. This means that a fix in a library may have no effect, and a warning you have already fixed can still appear after every compile.
The report uses the latest compiler listing (.prn) in the workspace, which shows the files that the compiler actually opened. The copies that were not opened are not in the listing, so the report also searches the workspace for .pkg, .inc and .h files with the same name. Compile the program at least once before you run this report.
A second section lists library folders that the workspace no longer uses, usually folders left behind after a move to git packages. A folder is listed only when nothing in it was compiled and no .sws file mentions it. For each folder, the report compares it with the package that replaced it, shows how many source files exist only in the old folder, and shows a rename command that you can run and undo.
Nothing is deleted or changed: a second copy can be an intended local version, and an old library folder can contain local changes.
The results are written to a log file; open it with Tools > Logs > Other Log Files.
Group: Tidy Up
TechStackReadinessReport
Reports only. Makes no changes to the source code.
Counts, for each topic and each file, where the workspace uses something that DataFlex's TechStack (the DataFlex 27 previews) changes:
- the data layer: Open, Relate, Add_Server_File, Make_File, File_Number, Main_File, Validate_Save, Field_Validate_msg, Entry_Item <table>.<column> and the table commands;
- cHttpTransfer;
- what TechStack does not support yet: the Windows user interface, COM/ActiveX, SOAP web services, and External_Function outside Windows;
- a String moved into a Boolean, which TechStack converts differently.
Each topic names the Data Access page it is based on. TechStack is a preview, so read the report as a list of where the work is, not as a final verdict.
The results are written to a log file; open it with Tools > Logs > Other Log Files.
Group: Modernization
TypeToStructReport
Reports only. Makes no changes to the source code.
Lists every legacy Type definition with a suggested modern Struct. Each Type is marked [MARSHALED to native code - hand-migrate] when it is passed to Windows, or [pure in-memory - safe to convert] when it is only used in DataFlex. The report also lists the buffer commands (Put, GETBUFF, StoreField ...) that must be migrated by hand.
For each Type that is only used in DataFlex, each group of lines that uses it is marked AUTO-CONVERTIBLE or BLOCKED, with the exact reason.
The results are written to a log file; open it with Tools > Logs > Other Log Files.
Group: x64 + Unicode
Fixes compiler message(s): 4532, 4536, 4533, 4534
UnicodeWin64ReportExternalFunction
Reports only. Makes no changes to the source code.
Checks every External_Function and External_Procedure declaration. It reports Integer and DWord parameters or return values whose name shows that they hold a pointer-sized Windows type (hWnd, lp*, lParam, size ...), which should be Handle, Pointer, Longptr or ULongptr. It also reports String parameters in an ANSI ("...A") declaration, which should be WString.
Then it lists every call of each ANSI declaration, which shows how much code a change to the wide version would affect, and marks buffer calls that pass an address with [structural].
The results are written to a log file; open it with Tools > Logs > Other Log Files.
Group: x64 + Unicode
UnusedSourceFiles
Reports only. Makes no changes to the source code.
Checks every file in the current workspace, and lists the files that are not used anywhere.
The report also writes a batch file, 'MoveUnusedSourceFiles.bat', to the DFRefactor_Backup folder. Running it moves the listed files into a sub-folder, without deleting them, so the change can be undone. Running the batch file is optional; the note at the end of the report explains how to undo it.
The results are written to a log file; open it with Tools > Logs > Other Log Files.
Group: Tidy Up
UnusedUseStatements
Reports only. Makes no changes to the source code.
For each file, finds the classes that each Use statement makes available, and reports a Use statement when the file creates no object of any of those classes.
Use files that contain only procedures or functions, and no classes, are not reported.
The results for all files are written to one log file; open it with Tools > Logs > Other Log Files.
Group: Tidy Up
Win64PointerTruncation
Reports only. Makes no changes to the source code.
64-bit check: reports a pointer-sized value that is moved into a 32-bit Integer or DWord, which cuts it off without any message in a 64-bit program. The value can be a variable or parameter declared as Pointer or Address, or the result of AddressOf(). Each method is checked on its own.
The results are written to a log file; open it with Tools > Logs > Other Log Files.
Group: x64 + Unicode
Win64StructPadding
Reports only. Makes no changes to the source code.
64-bit check: in each Struct...End_Struct, reports a pointer-sized member (Pointer, Address, Handle, Longptr or ULongptr) that does not start at an offset that is a multiple of 8, and therefore needs an extra member for 64-bit. A struct with a member of unknown size, or one that already uses an Is$Win64 condition, is noted and skipped.
The report does not change the code. Make the fix with the "Structure Padding Helper" tool from Data Access.
DataFlex structs do not add padding automatically as C does, so the fix is an extra member that is only compiled for 64-bit (#IFDEF Is$Win64 / Integer iAlign / #ENDIF), placed before the misaligned member in a struct that mirrors a Win32 API structure.
The results are written to a log file; open it with Tools > Logs > Other Log Files.
Group: x64 + Unicode
WinApiCallSiteReport
Reports only. Makes no changes to the source code.
Finds every External_Function whose declared return type differs from the Windows SDK, and lists each call that stores the result, with the variable that receives it and the type it was declared with.
A receiving variable that is smaller than the SDK's return type is the 64-bit error this report finds: it compiles without errors, and loses the top four bytes of an address.
Nothing is changed, because a receiving variable is usually used in other statements too, so changing its type is a decision that needs someone to read the whole method.
The results are written to a log file; open it with Tools > Logs > Other Log Files.
Group: x64 + Unicode