z/OS Tools & Language

Expand all | Collapse all

Other user executing script from my directory.

  • 1.  Other user executing script from my directory.

    Posted 11-17-2020 12:45
    I don't think this specifically has anything to do with the actual Rocket Open Source Tool (curl), but I was hoping someone here might be of assistance anyway.

    Any thoughts on this? I can execute this job and have no issue. I'm trying to let another developer run it. He's able to run /u/dvfjs/rocket/bin/curl directly (in STDPARM, following "SH ".) But if he executes my shell script (/u/dvfjs/jira_test) he gets "/u/dvfjs/rocket/bin/curl: /u/dvfjs/jira_test 4: FSUM7351 not found".

    I've set the read and execution bits for user, group and other for both curl and the jira_test shell script. Since the "echo" commands are working for him, he's obviously able to execute my shell script itself. What else might I be missing? The other developer has an OMVS segment, but he doesn't have an initial working directory or default shell configured yet. Could that be the issue? If so, what specifically is causing this particular issue?

    JCL:
    //DVRJZTST JOB ,'Test',CLASS=C,REGION=0M,NOTIFY=&SYSUID
    //*
    //UNIX EXEC PGM=BPXBATCH
    //STDOUT DD SYSOUT=*
    //STDERR DD SYSOUT=*
    //STDPARM DD *
    SH /u/dvfjs/jira_test
    /*

    /u/dvfjs/jira_test:
    #!/bin/sh -x

    echo **before**
    /u/dvfjs/rocket/bin/curl --help
    echo **after**

    File attributes:
    -sh|DVFJS:/u/dvfjs:>ls -FalTHp /u/dvfjs/jira_test
    - untagged T=off -rwxr-xr-x ---- 1 DVFJS DEPT9971 77 Nov 16 12:24 /u/dvfjs/jira_test
    -sh|DVFJS:/u/dvfjs:>ls -FalTHp /u/dvfjs/rocket/bin/curl
    - untagged T=off -rwxr-xr-x ---- 1 DVFJS DEPT9971 21266432 Nov 1 2019 /u/dvfjs/rocket/bin/curl

    STDERR:
    FSUM1012 The initial working directory was not specified.
    FSUM1006 A shell was not specified. Processing continues using the default shell name.
    + echo **before**
    + /u/dvfjs/rocket/bin/curl --help
    /u/dvfjs/rocket/bin/curl: /u/dvfjs/jira_test 4: FSUM7351 not found
    + echo **after**

    STDOUT:
    **before**
    **after**

    ------------------------------
    Frank Swarbrick
    FirstBank
    ------------------------------


  • 2.  RE: Other user executing script from my directory.

    Posted 11-17-2020 16:31
    Got this figured out.  I had to not only set the r and x bits for the program itself, but also for the "containing directories".

    ------------------------------
    Frank Swarbrick
    FirstBank
    ------------------------------



  • 3.  RE: Other user executing script from my directory.

    Posted 11-18-2020 16:30
    Thanks for the question and answer Frank! Hopefully someone can benefit from both.

    ------------------------------
    Dave Andrews
    Head of Customer Engagement
    Rocket Software
    ------------------------------