DtlSpawn version 1.0.0 released
DtlSpawn version 1.0.0 released
We are pleased to announce the availability of Version 1.0.0 of the free DtlSpawn utility for z/OS. This forum is the place to post your technical questions and feature requests.
See http://dovetail.com/products/dtlspawn.html for more details.
See http://dovetail.com/products/dtlspawn.html for more details.
Last edited by dovetail on Wed Oct 06, 2010 6:15 pm, edited 1 time in total.
Dirk, good to hear from you again!
You should be able to set the encoding by setting the LANG= environment variable in a //STDENV DD * card. Otherwise, if you take the default and run a login shell, you should have been able to set the LANG environment variable in your ~/.profile.
Please let us know if this works for you.
You should be able to set the encoding by setting the LANG= environment variable in a //STDENV DD * card. Otherwise, if you take the default and run a login shell, you should have been able to set the LANG environment variable in your ~/.profile.
Please let us know if this works for you.
Sorry, I forgot to mention that I meant the trace output in SYSOUT. It looks like (in character set IBM-273):
DtlSpawnÝN¨: Copyright (C) 2005-2006 Dovetailed Technologies LLC. All rights reserved.
DtlSpawnÝN¨: version 1.0.0 2007-01-16
Ý10:37:17.857¨ DtlSpawnÝT¨: <- setupEnvironment()
Ý10:37:17.857¨ DtlSpawnÝT¨: -> setupProgname()
After switching to IBM-1047 everything works fine, but most 3270 programs like personal communication require a disconnect to change the character set.
DtlSpawn[N]: Copyright (C) 2005-2006 Dovetailed Technologies LLC. All rights reserved.
DtlSpawn[N]: version 1.0.0 2007-01-16
[10:37:17.857] DtlSpawn[T]: <- setupEnvironment()
[10:37:17.857] DtlSpawn[T]: -> setupProgname()
Thanks
Dirk
DtlSpawnÝN¨: Copyright (C) 2005-2006 Dovetailed Technologies LLC. All rights reserved.
DtlSpawnÝN¨: version 1.0.0 2007-01-16
Ý10:37:17.857¨ DtlSpawnÝT¨: <- setupEnvironment()
Ý10:37:17.857¨ DtlSpawnÝT¨: -> setupProgname()
After switching to IBM-1047 everything works fine, but most 3270 programs like personal communication require a disconnect to change the character set.
DtlSpawn[N]: Copyright (C) 2005-2006 Dovetailed Technologies LLC. All rights reserved.
DtlSpawn[N]: version 1.0.0 2007-01-16
[10:37:17.857] DtlSpawn[T]: <- setupEnvironment()
[10:37:17.857] DtlSpawn[T]: -> setupProgname()
Thanks
Dirk
Problem with pipe and DTLSPAWN
I am trying to access data in a DD name:
//* Ignore the blank between bin and /sh. I can't post without.
//* I get a forbidden error message (404) without it.
//EX EXEC DTLSPAWN,CMD='/bin /sh'
//TXT DD *
This is a text
/*
//STDIN DD *
cat //DD:TXT
This works but if I pipe the result to an other shell comand like "cat //DD:TXT|grep text" I get the following error message:
EDC5037I The specified ddname was not found.
Any idea how to solve this problem?
Thanks
Dirk
//* Ignore the blank between bin and /sh. I can't post without.
//* I get a forbidden error message (404) without it.
//EX EXEC DTLSPAWN,CMD='/bin /sh'
//TXT DD *
This is a text
/*
//STDIN DD *
cat //DD:TXT
This works but if I pipe the result to an other shell comand like "cat //DD:TXT|grep text" I get the following error message:
EDC5037I The specified ddname was not found.
Any idea how to solve this problem?
Thanks
Dirk
Dirk,
It looks like a new address space is getting forked, rather than using a local spawn. DTLSPAWN sets the following variables which are supposed to prevent this:
Does your /etc/profile or .profile overide these? (By default, DTLSPAWN runs a login shell). Try adding these two lines to the top of your script, which will reset them if they are being changed by your profile scripts.
Kirk
It looks like a new address space is getting forked, rather than using a local spawn. DTLSPAWN sets the following variables which are supposed to prevent this:
Code: Select all
_BPX_SHAREAS=MUST
_BPX_SPAWN_SCRIPT=YES
Kirk
Sorry. No change at all (Don't forget to delete the blank between /bin and /sh if you want to try it yourself):
DtlSpawn[N]: Copyright (C) 2005-2006 Dovetailed Technologies LLC. All rights reserved.
DtlSpawn[N]: version 1.0.0 2007-01-16
DtlSpawn: executing given progname="/bin /sh"
DtlSpawn: returning with rc=exitcode=1
_EDC_ADD_ERRNO2=1
PATH=/bin:/usr/bin
_BPX_SPAWN_SCRIPT=YES
_=/bin/env
LIBPATH=/lib:/usr/lib:.
_BPXK_JOBLOG=STDERR
_BPX_SHAREAS=MUST
HOME=/u/al/user/al13808
TZ=MEZ-1MESZ,M3.5.0,M10.5.0
cat: //DD:TXT: EDC5037I The specified ddname was not found.
//EX EXEC DTLSPAWN,CMD='/bin /sh'
//TXT DD *
This is a text
/*
//STDIN DD *
_BPX_SHAREAS=MUST
_BPX_SPAWN_SCRIPT=YES
env
cat //DD:TXT|grep text
Thanks
Dirk
DtlSpawn[N]: Copyright (C) 2005-2006 Dovetailed Technologies LLC. All rights reserved.
DtlSpawn[N]: version 1.0.0 2007-01-16
DtlSpawn: executing given progname="/bin /sh"
DtlSpawn: returning with rc=exitcode=1
_EDC_ADD_ERRNO2=1
PATH=/bin:/usr/bin
_BPX_SPAWN_SCRIPT=YES
_=/bin/env
LIBPATH=/lib:/usr/lib:.
_BPXK_JOBLOG=STDERR
_BPX_SHAREAS=MUST
HOME=/u/al/user/al13808
TZ=MEZ-1MESZ,M3.5.0,M10.5.0
cat: //DD:TXT: EDC5037I The specified ddname was not found.
//EX EXEC DTLSPAWN,CMD='/bin /sh'
//TXT DD *
This is a text
/*
//STDIN DD *
_BPX_SHAREAS=MUST
_BPX_SPAWN_SCRIPT=YES
env
cat //DD:TXT|grep text
Thanks
Dirk
Ok, I was able to reproduce it, and the cause is a little surprising!
First, I should say that you might want to use "fromdsn" instead of cat when dealing with datasets. The default mode will work the same, but fromdsn allows you so many options.
So, this works fine:
And so does this (removing the space after bin)
But this will fail:
All I can figure is that there is a "feature" (bug) in the shell builtin version of cat that causes it to fork a new address space.
PS. There is something *very* wierd with PHPBB where it won't allow a "/bin /sh" with no spaces. Anybody ever seen this?
First, I should say that you might want to use "fromdsn" instead of cat when dealing with datasets. The default mode will work the same, but fromdsn allows you so many options.
So, this works fine:
Code: Select all
fromdsn //DD:TXT | grep aaa
Code: Select all
/bin /cat //DD:TXT | grep aaa
Code: Select all
cat //DD:TXT | grep aaa
PS. There is something *very* wierd with PHPBB where it won't allow a "/bin /sh" with no spaces. Anybody ever seen this?