How To
Summary
Notes on the FMTDTA command.
Additional Information
The Format Data (FMTDTA) command processes a series of sort specifications stored in a source file member.
It was introduced in the S36/S38 and continues to be used in many legacy applications. It has limitations with the number of records it can sort. It is not a hard limit and depends on a number of factors that does not allow IBM to give an exact number. In general, it is recommended to replace the FMTDTA sort with a more modern technique. Those options include (in no particular order):
Logical files or views
SQL
OPNQRYF
Use CPYF to filter records
Applying the DDS select/omit option.
Logical files or views
SQL
OPNQRYF
Use CPYF to filter records
Applying the DDS select/omit option.
When you exceed the record limit, you will encounter various MCH type errors. For example, MCH0601 to and from QUNRUN. You can attempt to resolve the error by increasing the memory for the pool the job is running in, and reducing the number of active jobs.
This can be done by running WRKSYSSTS when the job is running, note that they may have to page down to see all the output.
Does the 'Faults' column show any numbers other than zero? If so, this is probably the pool that the job is running in. By pressing F11 a few times, it will show additional information, including the name of the pools.
The pool size can be increased by changing the number in the Pool Size column to a higher value. If possible, try increasing this value in increments of 1000, until there are no page faults. This will also help the job to run faster. Note that increasing the size of one pool will decrease the size of another pool, that will happen automatically. The increase in pool size will stay until you change it again, it is not limited to your current session or job, so it may affect other users, or it may not be noticeable to them, depending on how much pool size other jobs actually need.
You can also bring the max active jobs value down in increments to see if the FMTDTA will complete.
If the above does not allow the process to complete, it is likely you have exceeded the abilities of the command and will need to migrate to one of the other options above.
===============================================
An issue was discovered where FMTDTA fails with MCH1210 to and from QUNRUN if WRKSYSSTS max active jobs for the pool it is running in, is greater than 32767.
This was fixed with APAR DT378725 and the following PTFs:
V7R4 SJ00285
V7R5 SJ00270
Document Location
Worldwide
[{"Type":"MASTER","Line of Business":{"code":"LOB68","label":"Power HW"},"Business Unit":{"code":"BU070","label":"IBM Infrastructure"},"Product":{"code":"SWG60","label":"IBM i"},"ARM Category":[{"code":"a8m3p0000006x8GAAQ","label":"CL"}],"ARM Case Number":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"All Versions"}]
Was this topic helpful?
Document Information
Modified date:
13 May 2025
UID
ibm17149663