Hello everyone,
I've recently started working with an old AS/400 machine and making my first programms in IBM Control Language.
However, right now I stumbled across a curious problem which I can't find a simple solution for.
The task itself is simple enough: I want a list of all JPGs in a few specific folders and their subfolders. This is easily enough achieved
with Qshells ls - R but I noticed that the listing occasionally just ends. I tracked the problem down to certain files that came from
our art departments Macs. Specifically, it seems Qshell can't handle the interpunct character ( ยท ) when it occurs in file names.
The code I'm currently using is
PGM
OVRDBF FILE(STDOUT) TOFILE(JQTEMP/JPGL) +
OVRSCOPE(*CALLLVL)
CLRPFM FILE(JPGP)
CD +
DIR('folder path in question')
QSH CMD('ls -R')
ENDPGM
Is there any way to handle these special characters or a better way to list folder contents at all? Sadly telling the art guys to stop using
the interpunct isn't an option. You know how it is.
Thanks in advance.
I've recently started working with an old AS/400 machine and making my first programms in IBM Control Language.
However, right now I stumbled across a curious problem which I can't find a simple solution for.
The task itself is simple enough: I want a list of all JPGs in a few specific folders and their subfolders. This is easily enough achieved
with Qshells ls - R but I noticed that the listing occasionally just ends. I tracked the problem down to certain files that came from
our art departments Macs. Specifically, it seems Qshell can't handle the interpunct character ( ยท ) when it occurs in file names.
The code I'm currently using is
PGM
OVRDBF FILE(STDOUT) TOFILE(JQTEMP/JPGL) +
OVRSCOPE(*CALLLVL)
CLRPFM FILE(JPGP)
CD +
DIR('folder path in question')
QSH CMD('ls -R')
ENDPGM
Is there any way to handle these special characters or a better way to list folder contents at all? Sadly telling the art guys to stop using
the interpunct isn't an option. You know how it is.
Thanks in advance.
Comment