Skip to main content
Feb 9, 2018 8:06 PM UTC

GIT release notes explanation required please

While I have 40 years experience with standard MVS I still have problems understanding some of the language used in USS.

The GIT release notes has a “Sample shell code (for .bashrc)” , the first line says

 # This must be sourced, not run

Can someone explain to me what “sourced” means ?

Regards,
Gary

    7 replies

    Feb 12, 2018 7:44 AM UTC

    While I have 40 years experience with standard MVS I still have problems understanding some of the language used in USS.

    The GIT release notes has a “Sample shell code (for .bashrc)” , the first line says

     # This must be sourced, not run
    

    Can someone explain to me what “sourced” means ?

    Regards,
    Gary

    Hello Gary!
    In this case it means that you’re not supposed to run .bashrc script as
    $ ./.bashrc
    but instead run it like
    $ source .bashrc
    Here is a good explanation of the difference here

    With respect, Dan.

    Feb 12, 2018 8:26 AM UTC

    While I have 40 years experience with standard MVS I still have problems understanding some of the language used in USS.

    The GIT release notes has a “Sample shell code (for .bashrc)” , the first line says

     # This must be sourced, not run
    

    Can someone explain to me what “sourced” means ?

    Regards,
    Gary

    Thanks Dan. The explanation is excellent.

    Feb 13, 2018 2:39 PM UTC

    While I have 40 years experience with standard MVS I still have problems understanding some of the language used in USS.

    The GIT release notes has a “Sample shell code (for .bashrc)” , the first line says

     # This must be sourced, not run
    

    Can someone explain to me what “sourced” means ?

    Regards,
    Gary

    Does “source” work for everyone? It does not work for me? I have to use the “dot” version. Specifically, if I do the following:
    source /u/dvfjs/swift-4/etc/profile
    I get an error: source: FSUM7351 not found. On the other hand, this works:
    . /u/dvfjs/swift-4/etc/profile

    I just realized that bash is not my default shell, so I guess the default shell (whatever that is) does not support “source”. Can a user change their default shell?

    Tatiana Balaburkina
    Rocketeer
    Feb 14, 2018 4:10 AM UTC

    Does “source” work for everyone? It does not work for me? I have to use the “dot” version. Specifically, if I do the following:
    source /u/dvfjs/swift-4/etc/profile
    I get an error: source: FSUM7351 not found. On the other hand, this works:
    . /u/dvfjs/swift-4/etc/profile

    I just realized that bash is not my default shell, so I guess the default shell (whatever that is) does not support “source”. Can a user change their default shell?

    Hi,

    You can change your login shell with this tso command:

    tsocmd alu your_login omvs(program(’/path/to/bash/bin/bash’))

    Feb 14, 2018 12:14 PM UTC

    Hi,

    You can change your login shell with this tso command:

    tsocmd alu your_login omvs(program(’/path/to/bash/bin/bash’))

    Thanks for the info. As an application developer I do not have ALTUSER access, even for myself. Oh well!

    Feb 16, 2018 9:38 AM UTC

    Does “source” work for everyone? It does not work for me? I have to use the “dot” version. Specifically, if I do the following:
    source /u/dvfjs/swift-4/etc/profile
    I get an error: source: FSUM7351 not found. On the other hand, this works:
    . /u/dvfjs/swift-4/etc/profile

    I just realized that bash is not my default shell, so I guess the default shell (whatever that is) does not support “source”. Can a user change their default shell?

    bash understands both, source and . (dot). /bin/sh understands . (dot) only, and /bin/tcsh understands source only.

    Nov 16, 2018 3:38 PM UTC

    Thanks for the info. As an application developer I do not have ALTUSER access, even for myself. Oh well!

    I am late to the game, but if you want to use bash as your login shell, add the following line to the end of your startup shell script (mine is .profile).

    exec bash

    This has been working well for me.