IBM Mainframe Forum Index
Log In
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register

OMVS Shell Script not working properly.

IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message

New User

Joined: 14 Jul 2020
Posts: 14
Location: Brazil

PostPosted: Sat Apr 10, 2021 6:25 am
Reply with quote

Hi Folks, I hope this is the right place to post this message, since I did not see any OMVS specific forums I think this might be the one.

So, I wonder if you can help me with a shell script that I am trying to create to run under OMVS, basically this script is supposed to ask for filesystem and vsam datasets and create the filesystem and mount the vsam in the given file system.

If I remove the while from my script it runs ok (going through all options) but what I am trying to accomplish is to create some sort of loop so the user can create and mount as many files it is needed.

Appreciate any suggestions or tips on what I might be doing wrong.
Thanks in advance as always !!


while test $i -ne 0                                                   
    echo Please insert the directory you want to create:               
    read ZFS_FILE                                                     
    mkdir -p $ZFS_FILE                                                 
    chmod -R 775 $ZFS_FILE                                             
    echo Filesystem $ZFS_FILE created!!                               
    echo Please insert the VSAM dataset file name:                     
    read VSAM_FILE                                                     
    mount -f $VSAM_FILE $ZFS_FILE                                     
    echo Vsam file $VSAM_FILE has been mounted on Filesystem $ZFS_FILE
    echo Type 0 to quit or enter to run another command               
echo Bye!                                                             
Back to top
View user's profile Send private message

Superior Member

Joined: 14 Mar 2007
Posts: 10856
Location: italy

PostPosted: Sat Apr 10, 2021 12:13 pm
Reply with quote

googling with bash while example would have given
at least two pages of links with working examples

here anyway the link to the bash manual
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics


Similar Topics
Topic Forum Replies
No new posts using EGREP in OMVS TSO/ISPF 9
No new posts ICETOOL with JOINKEY for Big record l... DFSORT/ICETOOL 12
No new posts JCL JOB Cancel/Purge Not Working JCL & VSAM 6
No new posts Embeding DB2 sql statements in scirpt... DB2 7
No new posts Alter User LOGON Script Parameters CLIST & REXX 11
Search our Forums:

Back to Top