DtlSpawn version 1.0.0 released

Discussion of the COZBATCH utility for z/OS
Post Reply
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

DtlSpawn version 1.0.0 released

Post by dovetail »

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.
Last edited by dovetail on Wed Oct 06, 2010 6:15 pm, edited 1 time in total.
mvsroot
Posts: 39
Joined: Thu Aug 12, 2004 8:18 am

Post by mvsroot »

Thanks for your great tool!
Is it possible to add a parameter to change the default character set of the output? Perhaps like "export JZOS_OUTPUT_ENCODING=IBM-273" in your (IBM's) JZOS.
Thanks
Dirk
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail »

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.
mvsroot
Posts: 39
Joined: Thu Aug 12, 2004 8:18 am

Post by mvsroot »

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
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail »

Thanks for the suggestion. We'll look into doing something about this in a later release.
mvsroot
Posts: 39
Joined: Thu Aug 12, 2004 8:18 am

Post by mvsroot »

Any news about a new release? (And it would be great if I can specify the character set of STDIN/STDOUT/STDERR too.)
Thanks
Dirk
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail »

Dirk,

I'm trying to think of the best thing to do here.... I'm not sure that it is worth translation all of our log messages from IBM-1047 to whatever for each message. Maybe we should just avoid using the [] characters. What do you think?

Kirk
mvsroot
Posts: 39
Joined: Thu Aug 12, 2004 8:18 am

Post by mvsroot »

Hi Kirk,

thanks for your answer. I think changing the square brackets to (for example) brackets would be the best solution for the log files.
Thanks
Dirk
mvsroot
Posts: 39
Joined: Thu Aug 12, 2004 8:18 am

Problem with pipe and DTLSPAWN

Post by mvsroot »

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
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail »

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:

Code: Select all

_BPX_SHAREAS=MUST
_BPX_SPAWN_SCRIPT=YES
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
mvsroot
Posts: 39
Joined: Thu Aug 12, 2004 8:18 am

Post by mvsroot »

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
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail »

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:

Code: Select all

fromdsn //DD:TXT | grep aaa
And so does this (removing the space after bin)

Code: Select all

/bin /cat //DD:TXT | grep aaa
But this will fail:

Code: Select all

cat //DD:TXT | grep aaa
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?
mvsroot
Posts: 39
Joined: Thu Aug 12, 2004 8:18 am

Post by mvsroot »

I thought the problem is the pipe, but if fromdsn works, I'll use this fine tool. Btw: cp doesn't work either.
Thanks for your test.
Dirk
Post Reply