Giter Site home page Giter Site logo

Comments (2)

marXtevens avatar marXtevens commented on August 23, 2024

EXECIO is on the MAINT 093 minidisk, as DMSXIO ASSEMBLE, and is part of VM/370 CE. The reason the problem occurs is that the right parenthesis used ')' for example in the following:

'EXECIO * CP ( STEM CPinfo. STRING ' CP_Command ' )'

Is consumed by the STRING parameter and passed to CP, causing an error. Therefor the solution is to NOT use the right parenthesis. Hence, the following code works as is needed.

/**********************************************************************/
ADDRESS 'COMMAND'                      /* Strict command evaluation.  */
SIGNAL ON SYNTAX                       /* Handle syntax errors.       */
SIGNAL ON NOVALUE                      /* Handle bad/no value errors. */


fn = 'GCC'
ft = 'EXEC'
fm = 'Y'

/**********************************************************************/
/* Scan specified file for string and place results in RDR spool file */
/**********************************************************************/

CPinfo. = ''
CP_Command = 'QUERY VIRTUAL 00C'
SAY CP_Command
'EXECIO * CP ( STEM CPinfo. STRING ' CP_Command

Counter = 0
DO UNTIL Counter > CPinfo.0
   SAY 'CPinfo.'Counter ' = ' CPinfo.Counter
   Counter = Counter + 1
END

/**********************************************************************/

New_Class = 'T'
CPinfo. = ''
CP_Command ='SPOOL CONSOLE START TO * TERM'
SAY CP_Command

'EXECIO * CP ( STEM CPinfo. STRING ' CP_Command

Counter = 0
DO UNTIL Counter > CPinfo.0
   SAY 'CPinfo.'Counter ' = ' CPinfo.Counter
   Counter = Counter + 1
END


New_Class = 'T'
CPinfo. = ''
CP_Command ='SPOOL CONSOLE START TO * TERM'
SAY CP_Command

'EXECIO * CP ( STEM CPinfo. STRING ' CP_Command

Counter = 0
DO UNTIL Counter > CPinfo.0
   SAY 'CPinfo.'Counter ' = ' CPinfo.Counter
   Counter = Counter + 1
END

/**********************************************************************/

PUSH '&ARGS'

'SCAN' fn ft fm

/**********************************************************************/

CPinfo. = ''
CP_Command = 'SPOOL CONSOLE STOP CLOSE TERM'
SAY CP_Command
'EXECIO * CP ( STEM CPinfo. STRING ' CP_Command

Counter = 0
DO UNTIL Counter > CPinfo.0
   SAY 'CPinfo.'Counter ' = ' CPinfo.Counter
   Counter = Counter + 1
END

PARSE VAR CPinfo.1 WITH . . SpoolID .
SAY 'Spool ID: ' SpoolID

IF SpoolID = '' THEN
   DO
      SAY 'Error: SpoolID ('SpoolID') not valid.'

Counter = 0
DO UNTIL Counter > CPinfo.0
   SAY 'CPinfo.'Counter ' = ' CPinfo.Counter
   Counter = Counter + 1
END

PARSE VAR CPinfo.1 WITH . . SpoolID .
SAY 'Spool ID: ' SpoolID

IF SpoolID = '' THEN
   DO
      SAY 'Error: SpoolID ('SpoolID') not valid.'
      RETURN 8
   END

/**********************************************************************/

CPinfo. = ''
CP_Command = 'CHANGE RDR ' SpoolID ' CLASS A'
SAY CP_Command

'EXECIO * CP ( STEM CPinfo. STRING ' CP_Command

Counter = 0
DO UNTIL Counter > CPinfo.0
   SAY 'CPinfo.'Counter ' = ' CPinfo.Counter
   Counter = Counter + 1
END

/**********************************************************************/

CPinfo. = ''
CP_Command = 'ORDER RDR ' SpoolID
SAY CP_Command

'EXECIO * CP ( STEM CPinfo. STRING ' CP_Command

Counter = 0
'EXECIO * CP ( STEM CPinfo. STRING ' CP_Command

Counter = 0
DO UNTIL Counter > CPinfo.0
   SAY 'CPinfo.'Counter ' = ' CPinfo.Counter
   Counter = Counter + 1
END

/**********************************************************************/

CPinfo. = ''
CP_Command = 'ORDER RDR ' SpoolID
SAY CP_Command

'EXECIO * CP ( STEM CPinfo. STRING ' CP_Command

Counter = 0
DO UNTIL Counter > CPinfo.0
   SAY 'CPinfo.'Counter ' = ' CPinfo.Counter
   Counter = Counter + 1
END

/**********************************************************************/

'EXECIO * CARD ( STEM RDRLINE.'

SAY RDRLINE.0 ' lines read.'

Counter = 0
DO UNTIL Counter > RDRLINE.0
   SAY 'RDRLINE.'Counter ' = ' RDRLINE.Counter
   Counter = Counter + 1
END

/**********************************************************************/
/* Exit cleanly.                                                      */
/**********************************************************************/
RETURN rc

from vm370.

BobBolch avatar BobBolch commented on August 23, 2024

')' character included in the string which was issued as a CP command caused the command failure. IBM deocuments that the trailing ')' should not be included when an EXECIO is issued with the STRING option.

from vm370.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.