It's late, and I'm not going to look for the Intrinsics manual, but, if
I remember correctly, the MPE command-line was/is limited to 255
characters, unless it's been increase and never noticed ;-)
Your code would put the %15 at position 500, maybe the problem, I don't
know. Why not try the following:
Change WS-CL-BUFFER to PIC X(254). In the following STRING
statement 'DELIMITED BY " "' is two spaces.
MOVE SPACES TO WS-CL-BUFFER
STRING WS-KSAMUTIL-BUILD-LINE DELIMITED BY " "
%15 DELIMITED BY SIZE INTO WS-CL-BUFFER.
Michael Anderson,
Brian Donaldson wrote:
> I had added the XEQERR portion AFTER the command intrinsic returned error
> code=0 and param=0 when actually the call had failed with the error:
>
> INVALID RESULTANT BLOCK SIZE (FSERR 11)
>
> It was then that I added the logic to send the output to the file XEQERR
> which I don't really need in the long run anyway. I'll probably take all
> that back out once I figure out how to get around the problem.
>
> Strangely enough, I got it to work by changing the CM KSAM file from a
> BINARY file to an ASCII file thus:
>
> KSAMCMF1.PUB.DEV & KSAMCMK1 ARE CREATED.
>
>
> However, that still doesn't solve the problem with the COMMAND intrinsic.
>
> Here's the code snippet :
>
> 01 WS-ERROR-CODE PIC S9(04) COMP VALUE ZEROES.
> 01 WS-PARAM PIC S9(04) COMP VALUE ZEROES.
>
> 01 WS-COMMAND-LINE.
> 05 WS-CL-BUFFER PIC X(499) VALUE SPACES.
> 05 WS-CL-CR PIC X(001) VALUE %15.
>
> 01 WS-KSAMUTIL-BUILD-LINE.
> 05 FILLER PIC X(40) VALUE
> 'RUN KSAMUTIL.PUB.SYS < XEQFILE > *XEQERR'.
>
> PROCEDURE DIVISION.
>
>
>
> ....
> ...
>
> MOVE SPACES TO WS-CL-BUFFER
> MOVE WS-KSAMUTIL-BUILD-LINE TO WS-CL-BUFFER
> MOVE %15 TO WS-CL-CR
>
> MOVE ZEROES TO WS-ERROR-CODE
> MOVE ZEROES TO WS-MSGNUM
> MOVE ZEROES TO WS-PARAM
> MOVE ZEROES TO ERR-FLAG
>
> CALL INTRINSIC "COMMAND" USING WS-COMMAND-LINE
> WS-ERROR-CODE
> WS-PARAM
>
> DISPLAY ">" WS-ERROR-CODE ">" WS-PARAM ">" WS-CL-BUFFER "<"
>
> IF WS-ERROR-CODE <> ZEROES THEN
> MOVE 631 TO WS-MSGNUM
> MOVE 1 TO ERR-FLAG
> GO TO A105-EXIT
> END-IF
>
> IF WS-PARAM <> ZEROES THEN
> MOVE 632 TO WS-MSGNUM
> MOVE WS-PARAM TO WS-ERROR-CODE
> MOVE ZEROES TO WS-PARAM
> MOVE 1 TO ERR-FLAG
> GO TO A105-EXIT
> END-IF
>
>
>
>
> On Mon, 25 Jan 2010 00:00:58 -0500, Roy Brown
> <[log in to unmask]> wrote:
>
>
>> COMMAND(cmdimage,cmderror,parmnum);In message
>> <[log in to unmask]>, Olav Kappert <[log in to unmask]>
>> writing at 23:27:15 in his/her local time opines:-
>>
>>> Brian:
>>>
>>> When using the command intrinsic, the last character of each line of
>>> the command must be a <cr> (i forget the excape seq).
>>>
>> 13 decimal or 15 octal.
>>
>>
>>> I notice the "&" is embedded in the actual command. I assume this is
>>> what the problem is. Do each part as a unique command with the <cr>
>>> character at the end of the line. So for your code, that would mean at
>>> commands.
>>>
>>> Olav.
>>>
>> I'm assuming the cmdimage in
>> COMMAND(cmdimage,cmderror,parmnum);
>> contains something like "DOBDCF(%15)"
>> and DODBCF is a command file with all those commands in it.
>>
>> But as Brian has not gifted us with the actual code and variables he is
>> using, speculation must needs be rife......
>>
>>> Brian Donaldson wrote:
>>>
>>>
>>>> I hope someone out there in cyberland may have a solution to this problem.
>>>>
>>>> I am executing a command file via the COMMAND intrinsic. I have also tried
>>>> using the HPCICOMMAND intrinsic as well but the results are the same.
>>>>
>>>> The execution of the command file is failing but the intrinsics are
>>>> returning error code = 0 and param = 0.
>>>>
>>>> So how can I figure out what the error is if the intrinsics are telling me it
>>>> executed successfully (which I know they didn't) ?
>>>>
>>>> FILE XEQERR;SAVE
>>>>
>>>>
>>>>
>>>>> +0000>+0000>RUN KSAMUTIL.PUB.SYS < XEQFILE > *XEQERR
>>>>>
>>>>>
>>>> <
>>>>
>>>> BUILD
>>>> KSAMCMF1/OLDKSAM1.PUB.DEV;REC=+8192,,F,BINARY;&TEMP;DISC=000050001;CODE
>>>> =+8133;LABELS=206;FIRSTREC=1;&KEY=B,003,001,,RDUP;KEY=B,004,001,,DUP;KE
>>>> Y=B,005,00&
>>>> 2,,RDUP;KEY=B,007,001,,DUP;KEYFILE=KSAMCMK1 &
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> EXIT
>>>>
>>>> PRINT XEQERR
>>>>
>>>> HP32208A.07.04 SUN, JAN 24, 2010, 8:07 PM KSAMUTIL VERSION:A.07.01
>>>>
>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>> INVALID RESULTANT BLOCK SIZE (FSERR 11)
>>>>
>>>>
>>>> Any help would be appreciated.
>>>>
>>>> TIA,
>>>> Brian Donaldson.
>>>>
>>>> * To join/leave the list, search archives, change list settings, *
>>>> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
>>>>
>>>>
>>>>
>>> * To join/leave the list, search archives, change list settings, *
>>> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
>>>
>> --
>> Roy Brown 'Have nothing in your houses that you do not know to be
>> Kelmscott Ltd useful, or believe to be beautiful' William Morris
>>
>> * To join/leave the list, search archives, change list settings, *
>> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
>>
>
> * To join/leave the list, search archives, change list settings, *
> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
>
>
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|