<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://try-as400.pocnet.net/index.php?action=history&amp;feed=atom&amp;title=Data_Structures%3ALID</id>
	<title>Data Structures:LID - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://try-as400.pocnet.net/index.php?action=history&amp;feed=atom&amp;title=Data_Structures%3ALID"/>
	<link rel="alternate" type="text/html" href="http://try-as400.pocnet.net/index.php?title=Data_Structures:LID&amp;action=history"/>
	<updated>2026-08-15T02:55:53Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>http://try-as400.pocnet.net/index.php?title=Data_Structures:LID&amp;diff=1769&amp;oldid=prev</id>
		<title>Friedkiwi: Document the LID (Load ID) container record format shared by COPYDIR and IMD1 (via create-page on MediaWiki MCP Server)</title>
		<link rel="alternate" type="text/html" href="http://try-as400.pocnet.net/index.php?title=Data_Structures:LID&amp;diff=1769&amp;oldid=prev"/>
		<updated>2026-08-08T16:57:06Z</updated>

		<summary type="html">&lt;p&gt;Document the LID (Load ID) container record format shared by COPYDIR and IMD1 (via create-page on MediaWiki MCP Server)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;A &amp;#039;&amp;#039;&amp;#039;LID&amp;#039;&amp;#039;&amp;#039; (&amp;#039;&amp;#039;Load ID&amp;#039;&amp;#039;) is IBM&amp;#039;s general-purpose container for shipping a blob of code or data to a machine. It is not specific to any one file, release, or processor architecture: the same 32-byte directory record describes SLIC modules, IOP and adapter microcode, and service processor firmware, and the same idea survives into modern POWER hardware.&lt;br /&gt;
&lt;br /&gt;
Because the record format is shared between several container files, it is documented here once rather than repeated in each. The container that uses it is described in [[System Files:QFILEIML]].&lt;br /&gt;
&lt;br /&gt;
== The directory record ==&lt;br /&gt;
A LID container consists of a header, a directory of fixed 32-byte records, and the payloads. Every record has the following layout. All fields are big endian.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Offset&lt;br /&gt;
!Size&lt;br /&gt;
!Field&lt;br /&gt;
!Notes&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;+0x00&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|LID identifier&lt;br /&gt;
|Not a sequence number. The high halfword is a &amp;#039;&amp;#039;family&amp;#039;&amp;#039; — see below.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;+0x04&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Offset&lt;br /&gt;
|In 512-byte blocks. &amp;#039;&amp;#039;&amp;#039;Base and meaning depend on the container&amp;#039;&amp;#039;&amp;#039; — see the warning below.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;+0x08&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Length&lt;br /&gt;
|In 512-byte blocks.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;+0x0C&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Flags&lt;br /&gt;
|&amp;lt;code&amp;gt;0x80000000&amp;lt;/code&amp;gt; = compressed. No other bit has been observed set.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;+0x10&amp;lt;/code&amp;gt;&lt;br /&gt;
|8&lt;br /&gt;
|SLS address&lt;br /&gt;
|Where the payload is to be staged in single-level store.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;+0x18&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Time&lt;br /&gt;
|Packed BCD &amp;lt;code&amp;gt;HHMM&amp;lt;/code&amp;gt;; read the field as hexadecimal to display it. &amp;lt;code&amp;gt;0x00001757&amp;lt;/code&amp;gt; is 17:57.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;+0x1C&amp;lt;/code&amp;gt;&lt;br /&gt;
|4&lt;br /&gt;
|Date&lt;br /&gt;
|Packed BCD &amp;lt;code&amp;gt;YYYYMMDD&amp;lt;/code&amp;gt;, likewise. &amp;lt;code&amp;gt;0x19970318&amp;lt;/code&amp;gt; is 1997-03-18.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The directory is terminated by a record whose identifier field is &amp;lt;code&amp;gt;0xC5D5C440&amp;lt;/code&amp;gt;, which is the EBCDIC string &amp;lt;code&amp;gt;END&amp;amp;nbsp;&amp;lt;/code&amp;gt;. A zero identifier also terminates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;#039;&amp;#039;&amp;#039;Note!&amp;#039;&amp;#039;&amp;#039; The &amp;#039;&amp;#039;&amp;#039;offset&amp;#039;&amp;#039;&amp;#039; field is the field most likely to mislead. It is &amp;#039;&amp;#039;not&amp;#039;&amp;#039; universally a byte or block offset into the container file. In the &amp;lt;code&amp;gt;IMD1&amp;lt;/code&amp;gt; container it is a load-source LBA — an address on the installation medium — and is meaningless as a file offset; payloads there are instead laid out sequentially in directory order. See [[System Files:QFILEIML]] for the worked case. Always establish the addressing base for a given container before extracting anything.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Worked example ===&lt;br /&gt;
The first record of the &amp;lt;code&amp;gt;IMD1&amp;lt;/code&amp;gt; directory in a V4R4 &amp;lt;code&amp;gt;QFILEIML&amp;lt;/code&amp;gt;, at file offset &amp;lt;code&amp;gt;0x420&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
00000420: 8070 0830 0000 0210 0000 0004 0000 0000&lt;br /&gt;
00000430: ffff ffff 9300 1000 0000 1757 1997 0318&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
decodes as LID &amp;lt;code&amp;gt;80700830&amp;lt;/code&amp;gt;, offset block 528, length 4 blocks (2&amp;amp;thinsp;KiB), flags 0 (not compressed), SLS address &amp;lt;code&amp;gt;FFFFFFFF93 001000&amp;lt;/code&amp;gt;, timestamp 1997-03-18 17:57.&lt;br /&gt;
&lt;br /&gt;
That same record appears byte for byte as the sixth LID of &amp;lt;code&amp;gt;QFILEMCD&amp;lt;/code&amp;gt;&amp;#039;s nested &amp;lt;code&amp;gt;COPYDIR&amp;lt;/code&amp;gt; LID directory, which is what establishes that the two containers share one record format.&lt;br /&gt;
&lt;br /&gt;
== The SLS address field ==&lt;br /&gt;
The 8-byte address is a single-level store address, split 40/24 into a segment identifier and a byte offset within the segment, so segments are 16&amp;amp;thinsp;MiB. Printed with that split, the example above is segment &amp;lt;code&amp;gt;FFFFFFFF93&amp;lt;/code&amp;gt;, offset &amp;lt;code&amp;gt;0x001000&amp;lt;/code&amp;gt;. This is the same notation the DST &amp;#039;&amp;#039;Display/Alter storage&amp;#039;&amp;#039; panel accepts.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;FFFFFFFFxx&amp;lt;/code&amp;gt; band is resident Licensed Internal Code. Note that a segment identifier recorded in a directory is the &amp;#039;&amp;#039;load source&amp;#039;&amp;#039; segment — where the payload was saved from, or is staged into — which is not necessarily the segment the code eventually executes in. Payloads destined for an IOP or the service processor are staged into a SLIC segment first and then transferred over the bus to the target card, so an &amp;lt;code&amp;gt;FFFFFFFFxx&amp;lt;/code&amp;gt; address does &amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039; imply the payload is SLIC code.&lt;br /&gt;
&lt;br /&gt;
== LID identifier families ==&lt;br /&gt;
The identifier is structured rather than sequential: the high halfword groups LIDs into families, and members of a family share a purpose. In a V4R4 &amp;lt;code&amp;gt;QFILEIML&amp;lt;/code&amp;gt; the most populous families are:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Family&lt;br /&gt;
!Records&lt;br /&gt;
!Observed contents&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;a170&amp;lt;/code&amp;gt;&lt;br /&gt;
|144&lt;br /&gt;
|Not established&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;a0b0&amp;lt;/code&amp;gt;&lt;br /&gt;
|66&lt;br /&gt;
|Not established&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;a100&amp;lt;/code&amp;gt;&lt;br /&gt;
|56&lt;br /&gt;
|Not established&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;8190&amp;lt;/code&amp;gt;&lt;br /&gt;
|54&lt;br /&gt;
|Not established&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;a0c0&amp;lt;/code&amp;gt;&lt;br /&gt;
|37&lt;br /&gt;
|Not established&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;8390&amp;lt;/code&amp;gt;&lt;br /&gt;
|36&lt;br /&gt;
|Not established&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;a090&amp;lt;/code&amp;gt;&lt;br /&gt;
|33&lt;br /&gt;
|Largely 32-bit PowerPC firmware images&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;8590&amp;lt;/code&amp;gt;&lt;br /&gt;
|30&lt;br /&gt;
|Largely 32-bit PowerPC firmware images&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;8090&amp;lt;/code&amp;gt;&lt;br /&gt;
|29&lt;br /&gt;
|Mixed; includes the service processor firmware and the two large SLIC LIDs&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The purpose of most families has not been established. The &amp;lt;code&amp;gt;80xxxxxx&amp;lt;/code&amp;gt; range is the only one &amp;lt;code&amp;gt;QFILEMCD&amp;lt;/code&amp;gt; uses.&lt;br /&gt;
&lt;br /&gt;
== The compressed flag ==&lt;br /&gt;
Bit &amp;lt;code&amp;gt;0x80000000&amp;lt;/code&amp;gt; marks a payload as compressed. The codec is the LZW variant implemented in SLIC by the routines &amp;lt;code&amp;gt;LZdcomp&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;cpdcomp&amp;lt;/code&amp;gt;, which supports 9-, 10- and 12-bit codes and dispatches on a leading format byte of &amp;lt;code&amp;gt;0x11&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;0x21&amp;lt;/code&amp;gt;. It is &amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039; any of the OS/400 &amp;lt;code&amp;gt;*LOW&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*MEDIUM&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;*HIGH&amp;lt;/code&amp;gt; save-file compression methods, nor zlib or raw deflate; all of those have been tried against real payloads and fail immediately.&lt;br /&gt;
&lt;br /&gt;
The flag should be treated as advisory rather than exact. In one V4R4 &amp;lt;code&amp;gt;QFILEIML&amp;lt;/code&amp;gt;, 31 payloads carry the compressed flag yet begin with clean, plainly readable 32-bit PowerPC function prologues. Whatever the flag governs, it is not a simple &amp;quot;this entire payload is one compressed stream&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Containers and consumers ==&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;&amp;lt;code&amp;gt;COPYDIR&amp;lt;/code&amp;gt;&amp;#039;&amp;#039;&amp;#039;, the directory in &amp;lt;code&amp;gt;QFILEMCD&amp;lt;/code&amp;gt;, carries SLIC itself as a nested LID directory.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;&amp;lt;code&amp;gt;IMD1&amp;lt;/code&amp;gt;&amp;#039;&amp;#039;&amp;#039;, the format of [[System Files:QFILEIML]], carries IOP, adapter and service processor microcode alongside SLIC modules.&lt;br /&gt;
* SLIC contains an interactive &amp;#039;&amp;#039;&amp;#039;LID filesystem&amp;#039;&amp;#039;&amp;#039;. The commands &amp;lt;code&amp;gt;IdeLidFileSystem&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;IdeCopyLidCmd&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;IdeFindLidCmd&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;IdeVerifyLid&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;IdeCompressLidCmd&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;IdeDecompressLidCmd&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;IdeLidListCmd&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;IdeMakeTempLidCmd&amp;lt;/code&amp;gt; all appear in a V4R4 name index, so a LID is a first-class object to the machine rather than merely an installation-media artefact.&lt;br /&gt;
* Adapter and IOP classes in SLIC expose a &amp;lt;code&amp;gt;downLoadLid&amp;lt;/code&amp;gt; method, which is the mechanism by which a staged LID reaches the card.&lt;br /&gt;
* On modern POWER hardware the &amp;#039;&amp;#039;&amp;#039;flexible service processor&amp;#039;&amp;#039;&amp;#039; holds a filesystem of LIDs containing the hypervisor, the Open Firmware image used by AIX and Linux partitions, the component that replaces the physical front panel, and adapter firmware for several third-party network and storage cards.&amp;lt;ref&amp;gt;Reported by a machine owner familiar with FSP internals; not independently verified here, but consistent with IBM&amp;#039;s evident reuse of the container across generations.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Scope of this description ==&lt;br /&gt;
Everything above was read from a single V4R4 installation image and cross-checked between its two container files. Field offsets, sizes and the terminator are considered established. Family meanings, and the exact semantics of the compressed flag, are not.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[System Files:QFILEIML]]&lt;br /&gt;
* [[CISC AS/400 LIC Tapes]]&lt;br /&gt;
&lt;br /&gt;
== Footnotes ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: System Internals]]&lt;/div&gt;</summary>
		<author><name>Friedkiwi</name></author>
	</entry>
</feed>