|
3 | 3 |
|
4 | 4 | use ToolkitApi\ProgramParameter; |
5 | 5 |
|
6 | | -/* |
| 6 | +/** |
7 | 7 | * Functionality for parsing PCML |
8 | 8 | */ |
9 | 9 | class ToolkitPcml |
@@ -192,26 +192,24 @@ public function getConnection() |
192 | 192 | } |
193 | 193 |
|
194 | 194 | /** |
| 195 | + * given a program path that MAY be qualified by a library and slash, such as |
| 196 | + * /QSYS.LIB/*LIBL.LIB/MYPGM.PGM though it QSYS is the program library, QSYS.LIB |
| 197 | + * will only appear once, split it up and return an array of the form: |
| 198 | + * |
| 199 | + * [lib]=>xxx, [obj]=>yyy |
| 200 | + * |
| 201 | + * If no library, that part will be blank. |
| 202 | + * Note, library could also be *LIBL.LIB |
| 203 | + * |
| 204 | + * Break up path, separated now by slashes. can be varied lib and pgm. |
| 205 | + * remove the /qsys.lib that may be in front but only if it's simply qualifying another library. qsys may be the actual program library, too. |
| 206 | + * |
195 | 207 | * @param $path |
196 | 208 | * @return array |
197 | 209 | * @throws \Exception |
198 | 210 | */ |
199 | 211 | public function splitPcmlProgramPath($path) |
200 | 212 | { |
201 | | - // given a program path that MAY be qualified by a library and slash, |
202 | | - // such as /QSYS.LIB/*LIBL.LIB/MYPGM.PGM |
203 | | - // though it QSYS is the program library, QSYS.LIB will only appear once, |
204 | | - // split it up and return an array of the form: |
205 | | - // [lib]=>xxx, [obj]=>yyy |
206 | | - // If no library, that part will be blank. |
207 | | - |
208 | | - // Note, library could also be *LIBL.LIB |
209 | | - |
210 | | - // Break up path, separated now by slashes. can be varied lib and pgm. |
211 | | - // remove the /qsys.lib that may be in front but only if it's simply qualifying another library. qsys may be the actual program library, too. |
212 | | - |
213 | | - // trim not only spaces, but slashes, from beginning and end. |
214 | | - // also make uppercase for consistency. (OK to use uppercase--lib and program here, not function) |
215 | 213 | $path = strtoupper(trim($path, " /")); |
216 | 214 |
|
217 | 215 | // remove .LIB, .PGM, .SRVPGM that might be extensions for IFS-style file path. |
|
0 commit comments