I am trying to understand how to issue a unix via a Cobol Program running
in Batch ..I found an example  IBM supplied...

      Working-storage section.
       01 Start-Filler      pic x(41)
            value '********** Working Storage Begin ********'.
       01 exec-path         pic x(100).
       01 exec-path-ptr     pointer.
       01 exec-parm1        pic x(100).
       01 exec-parm1-ptr    pointer.
       01 exec-parm2        pic x(100).
       01 exec-parm2-ptr    pointer.
       01 null-ptr          pointer value null.
       Local-storage section.
       01 rc                pic s9(9) binary.
       Procedure division.
           Move Z'tsocmd' to exec-path.
           Move Z'SEARCH CLASS(USER)' to exec-parm1
           Set exec-path-ptr to address of exec-path
           Set exec-parm1-ptr to address of exec-parm1
           Set exec-parm2-ptr to address of exec-parm2
                      Call 'execl' using by value exec-path-ptr
                              by value exec-parm1-ptr
                              by value null-ptr
                        returning rc
           if rc = 0 then
              display 'tsocmd worked'
           end-if
           Goback.

My problem is how to i route the output back the caller ? I thought if I
used STDOUT it would , but apparently not.

//ETESTR4  JOB SYSTEMS,MSGLEVEL=(1,1),MSGCLASS=X,CLASS=A,PRTY=8,
//     NOTIFY=&SYSUID,REGION=4096K
//STEP1  EXEC  PGM=CBLUNIX,REGION=0K,
//   PARM='POSIX(ON) ALL31(ON) ENVAR("_CEE_ENVFILE=DD:STDENV")/'
//STEPLIB  DD  DSN=IDF.TESTUNIX.LOADLIB,DISP=SHR
//SYSPRINT DD  SYSOUT=*
//SYSOUT   DD  SYSOUT=*
//STDENV   DD  SYSOUT=*
/*

I am unsure how this works, if someone could point me a to a manual I would
be  'Happy Happy'..


-- 

 Regards,


*IDMWORKS *

Scott Ford

z/OS Dev.




“By elevating a friend or Collegue you elevate yourself, by demeaning a
friend or collegue you demean yourself”



www.idmworks.com

[email protected]

Blog: www.idmworks.com/blog





*The information contained in this email message and any attachment may be
privileged, confidential, proprietary or otherwise protected from
disclosure. If the reader of this message is not the intended recipient,
you are hereby notified that any dissemination, distribution, copying or
use of this message and any attachment is strictly prohibited. If you have
received this message in error, please notify us immediately by replying to
the message and permanently delete it from your computer and destroy any
printout thereof.*

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to