Hi guys, can you help me with some tips concerning the scan in CLLE and substring the variable and split it in two diferent variables?
I have something like this - I want to create in IFS a path with some value received in parameters:
PGM PARM( &DIR)
I want to create the directories unde /home
I have MKDIR (&PATH) where &PATH='/home' *TCAT &DIR
but I have some cases when &DIR it's not an atomic value such My_directory, in some cases I have My_dir/My_subdir
and in this cases the MKDIR fails because I saw that I have to create initially the parent directory, in this case /home/My_dir, to be able to create /home/My_dir/My_subdir
How can I scan the &DIR to see if I have some '/' slashes into the string and split it in different variables and build the path step by step and create each directory into IFS?
I have something like this - I want to create in IFS a path with some value received in parameters:
PGM PARM( &DIR)
I want to create the directories unde /home
I have MKDIR (&PATH) where &PATH='/home' *TCAT &DIR
but I have some cases when &DIR it's not an atomic value such My_directory, in some cases I have My_dir/My_subdir
and in this cases the MKDIR fails because I saw that I have to create initially the parent directory, in this case /home/My_dir, to be able to create /home/My_dir/My_subdir
How can I scan the &DIR to see if I have some '/' slashes into the string and split it in different variables and build the path step by step and create each directory into IFS?
Comment