I have a problem with array processing in COZ:Launcher which executes a script on Linuz. I am getting bad substitution when doing array processing, probably due to the special characters. This is a simulation script which gives bad substitution on ${array[@]}. The same works fine in Linux when executed as a script from the Linux shell:
STDIN DD *
array+=" first second third "
for i in "${array[@]}"
do
echo $i
done
COZ:Launcher bad substitution array processing
Re: COZ:Launcher bad substitution array processing
Co:Z Launcher uses something like the following command under the covers to read DD:STDIN:
fromdsn //DD:STDIN
This is coming from the remote/target system, so by default the data will be translated from the default z/OS (EBCDIC) codepage to the default/current codepage on the target system.
On z/OS, the default will probably be IBM-1047 (Latin-1 EBCDIC).
So, the question is this: is your STDIN input (on z/OS) using brackets in codepage IBM-1047?
If your TN3270 emulator is not using codepage IBM-1047, then probably not.
(In IBM-1047, [ is x'AD', and ] is x'BD' )
fromdsn //DD:STDIN
This is coming from the remote/target system, so by default the data will be translated from the default z/OS (EBCDIC) codepage to the default/current codepage on the target system.
On z/OS, the default will probably be IBM-1047 (Latin-1 EBCDIC).
So, the question is this: is your STDIN input (on z/OS) using brackets in codepage IBM-1047?
If your TN3270 emulator is not using codepage IBM-1047, then probably not.
(In IBM-1047, [ is x'AD', and ] is x'BD' )
Re: COZ:Launcher bad substitution array processing
You were right!
My emulator codepage was 037 where [ is X'BA' and ] is X'BB' whereas it should be [ X'AD' and ]=X'BD' for codepage 1047 in COZ:LAUNCHER . I hex-edited the script on z/OS to correct the values and all works fine now.
Thanks for you help.
My emulator codepage was 037 where [ is X'BA' and ] is X'BB' whereas it should be [ X'AD' and ]=X'BD' for codepage 1047 in COZ:LAUNCHER . I hex-edited the script on z/OS to correct the values and all works fine now.
Thanks for you help.
-
- Posts: 1
- Joined: Wed Dec 31, 2014 6:36 am
Re: COZ:Launcher bad substitution array processing
I don't know.
Does it work without OUTDES if you do it locally from a z/OS shell? (there should be absolutely no difference).
If not, you might open an ETR with IBM, or post a question to the mvs-oe list (the developer of BPXWDYN will often reply there).
Does it work without OUTDES if you do it locally from a z/OS shell? (there should be absolutely no difference).
If not, you might open an ETR with IBM, or post a question to the mvs-oe list (the developer of BPXWDYN will often reply there).