Open-source Languages & Tools for z/OS

 View Only
Expand all | Collapse all

DSFS sed: couldn't open temporary file ./sed2oJfvp: EDC5121I Invalid argument.

  • 1.  DSFS sed: couldn't open temporary file ./sed2oJfvp: EDC5121I Invalid argument.

    Posted 02-28-2024 09:51

    Hi,

    We have installed DSFS.
    When I `cd` to a PDS and do a `sed -i ...`,
    sed wants to create a tmp file in current directory, however,
    this tmp file is not a valid member name.

    Would be nice if someon could write a path, that would make sed
    create the tmp file in fx /tmp.

    myUSER@myMVS:~$ sed --version
    sed (GNU sed) 4.2.2
    Copyright (C) 2012 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.

    Written by Jay Fenlason, Tom Lord, Ken Pizzini,
    and Paolo Bonzini.
    GNU sed home page: <http://www.gnu.org/software/sed/>.
    General help using GNU software: <http://www.gnu.org/gethelp/>.
    E-mail bug reports to: <bug-sed@gnu.org>.
    Be sure to include the word ``sed'' somewhere in the ``Subject:'' field.

    myUSER@myMVS:~$ cd /dsfs/txt/myuser/clist

    myUSER@myMVS:/dsfs/txt/myuser/clist$ sed -i 's/a/b/' b
    sed: couldn't open temporary file ./sed2oJfvp: EDC5121I Invalid argument.

    /Morten



    ------------------------------
    Morten Kjærulff
    Self Registered
    København S DK
    ------------------------------


  • 2.  RE: DSFS sed: couldn't open temporary file ./sed2oJfvp: EDC5121I Invalid argument.

    ROCKETEER
    Posted 02-28-2024 10:57

    Hi Morten,

    I never worked with DSFS, but as in idea - avoid using the -i key:

    sed 's/a/b/' b > tmp; cat tmp > b (or maybe cp command here); rm tmp

    Thanks,
    Alex



    ------------------------------
    Alexander Klochkov
    QA
    Rocket Internal - All Brands
    Vilnius LT
    ------------------------------