Hi Jamie/All,
I have been studying the code written to convert spool files to PDF. We already have a utility that we use which converts spool files to PDF documents but we do not have source code for the same, so I was intrested in knowing how you create a PDF file in AS400.
Well I looked at the API used QUSRSPLA and when I looked at the RPG where DS for this API was defined, found that some of the fields at the end of the DS for the format SPLA0100 were missing. Immediately I thought may be those are optional however IBM guide does't suggests as such.
Is it ok to exclude the fields in a fixed format DS provided by IBM for using API's? I am sorry it must be a foolish question considering the program works, but still I couldn't find anything about this concept on web.
Missing fields are as below, most of these are user defined, may be that explains why they were excluded?
Thanks,
Proto.
I have been studying the code written to convert spool files to PDF. We already have a utility that we use which converts spool files to PDF documents but we do not have source code for the same, so I was intrested in knowing how you create a PDF file in AS400.
Well I looked at the API used QUSRSPLA and when I looked at the RPG where DS for this API was defined, found that some of the fields at the end of the DS for the format SPLA0100 were missing. Immediately I thought may be those are optional however IBM guide does't suggests as such.
Is it ok to exclude the fields in a fixed format DS provided by IBM for using API's? I am sorry it must be a foolish question considering the program works, but still I couldn't find anything about this concept on web.
Missing fields are as below, most of these are user defined, may be that explains why they were excluded?
| 1142 | 476 | CHAR(2) | Reserved |
| 1144 | 478 | BINARY(4) | Offset to user-defined options |
| 1148 | 47C | BINARY(4) | Number of user-defined options returned |
| 1152 | 480 | BINARY(4) | Length of each user-defined option entry |
| 1156 | 484 | CHAR(255) | User-defined data |
| 1411 | 583 | CHAR(10) | User-defined object name |
| 1421 | 58D | CHAR(10) | User-defined object library name |
| 1431 | 597 | CHAR(10) | User object type |
| 1441 | 5A1 | CHAR(3) | Reserved |
| 1444 | 5A4 | PACKED(15,5) | Character set point size |
| 1452 | 5AC | PACKED(15,5) | Coded font point size |
| 1460 | 5B4 | PACKED(15,5) | DBCS-coded font point size |
| 1468 | 5BC | BINARY(4) | Auxiliary storage pool |
| 1472 | 5C0 | BINARY(4) | Spooled file size |
| 1476 | 5C4 | BINARY(4) | Spooled file size multiplier |
| 1480 | 5C8 | BINARY(4) | Internet print protocol job identifier |
| 1484 | 5CC | CHAR(1) | Spooled file creation security method |
| 1485 | 5CD | CHAR(1) | Spooled file creation authentication method |
| 1486 | 5CE | CHAR(7) | Date writer began processing spooled file |
| 1493 | 5D5 | CHAR(6) | Time writer began processing spooled file |
| 1499 | 5DB | CHAR(7) | Date writer completed processing spooled file |
| 1506 | 5E2 | CHAR(6) | Time writer completed processing spooled file |
| 1512 | 5E8 | CHAR(8) | Job system name |
1520 |
5F0 | CHAR(10) | Auxiliary storage pool device name![]() |
Proto.


1520


Comment