On 10 March 2016 at 16:26, Paul Gilmartin < 0000000433f07816-dmarc-requ...@listserv.ua.edu> wrote:
> Is there any limit to the length of a TSO command other than that imposed by the aggregate length of the various operands? IKJSCAN and IKJPARSE are probably what define this, though there may be other de facto limits. But all the TSO service routines deal with buffers starting with a halfword length which includes the length of itself and the next halfword. Here's the doc from the MVS 3.8 source for IKJPARS: * THE COMMAND BUFFER IS OF THE FORM - * * * * ******************************************* * * BUFFER: / LENGTH / OFFSET / TEXT / * * ******************************************* * * OFFSET: 0 2 4 * * * * THE LENGTH INCLUDES THE LENGTH OF THE LENGTH AND OFFSET FIELDS* * WITH THE BUFFER OFFSET POINTING TO THE LOCATION IN THE BUFFER * * WHERE PARSE IS TO BEGIN SCANNING. THE COMMAND SCAN SERVICE * * ROUTINE PREVIOUSLY UPDATED THE OFFSET PAST THE COMMAND NAME. * SCAN is typically looking at just the first few bytes of the buffer, but in theory you could pass in a very long buffer with the command in the last few bytes. So I'd say in theory a command could be 32k-4 or 64k-4 bytes long. > ISPF Command Shell imposes a limit of 240. Absurdly small given that a PATH() > for ALLOCATE may be up to 255. Sure. But ISPF has blatantly ignored many of the basic rules of TSO pretty much from the beginning. As have a whole new generation of IBM developers who've written non conforming TSO commands. > What's the API for TSO commands called so I can look it up? API to do what - invoke a command? Within ISPF I have no idea. And there isn't really a native TSO API to say "run this command". You set up the command buffer, and the CPPL which points to it, and ATTACH the program that is the command. Well, there is Johnny-come-lately IKJEFTSR, and if documents the command buffer length (without the two halfwords) as 32767, even though the length field is a fullword. Tony H. Tony H...fffffff ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN