dbTalk Databases Forums  

Shell script to run paragraph

comp.databases.pick comp.databases.pick


Discuss Shell script to run paragraph in the comp.databases.pick forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
havolinec
 
Posts: n/a

Default Shell script to run paragraph - 06-23-2003 , 09:59 PM







Hi all,

I've create a paragraph in VOC file:

Paragraph name - USERPARA

001: PA
002: GET.LIST USERSLIST
003: ECLTYPE U
004: LIST DIST.DATA USING DICT DIST.KC DIST.ID NAME.FULL AMOUNT TO DELIM
";" _HOLD_/TESTDATA.TXT
005: ECLTYPE P

I'm new in Unidata and Unix. I'd really appreciate if anyone could
provide some detail sample to create a shell script that will run the
above paragraph.

Thanks for any feedback.

--
Posted via http://dbforums.com

Reply With Quote
  #2  
Old   
Angelo Collazo
 
Posts: n/a

Default Re: Shell script to run paragraph - 06-24-2003 , 10:33 AM






Here you go. Hope it helps. In your case UDHOME not UVHOME(UniVerse)

clear.userno.map script.
MAIL=/usr/mail/${LOGNAME:?}
PATH=$PATH:/home/dw:/usr/uv/bin:/sbin:/usr/sbin:/usr/bin:/etc:/usr/spool/uv ; ex
port PATH
UVHOME=/usr/uv ; export UVHOME
UVBIN=/usr/uv/bin ; export UVBIN
NOCHKLPREQ=1 ; export NOCHKLPREQ
LPHOME=/usr/spool; export LPHOME
umask 000
TERM=vt100; export TERM
cd /dbms/live/TR
/usr/uv/bin/uv < /home/dw/clear.userno.map.input > /tmp/clear.userno.map.output
~~~~~~~~~~~
VOC commands script: clear.userno.map.input
USERLOGINNAME,PASSWORD,VT100
TCL

TIME
WHO
ED GLOBALVOC USERNO.MAP
L999
T
DE9999
FI
TIME
OFF

havolinec <member27252 (AT) dbforums (DOT) com> wrote

Quote:
Hi all,

I've create a paragraph in VOC file:

Paragraph name - USERPARA

001: PA
002: GET.LIST USERSLIST
003: ECLTYPE U
004: LIST DIST.DATA USING DICT DIST.KC DIST.ID NAME.FULL AMOUNT TO DELIM
";" _HOLD_/TESTDATA.TXT
005: ECLTYPE P

I'm new in Unidata and Unix. I'd really appreciate if anyone could
provide some detail sample to create a shell script that will run the
above paragraph.

Thanks for any feedback.

Reply With Quote
  #3  
Old   
Steve Rathkopf
 
Posts: n/a

Default Re: Shell script to run paragraph - 06-25-2003 , 08:28 AM



Of course, from the ECL prompt, you could simply type USERPARA. Or,
you could write SCRIPT.PGM

PROGRAM SCRIPT.PGM
CMD = 'USERPARA'
EXECUTE CMD
END

That would do the same thing and 'pose' as a script in the UniData
environment.

I make these suggestions as you did not specify where you wanted the
script to reside, and there was already a suggestion for a script at
the *nix level.

Steve
************************************************** ****
acollazo (AT) tsbrass (DOT) com (Angelo Collazo) wrote in message news:<cfb4de4e.0306240733.6a148383 (AT) posting (DOT) google.com>...
Quote:
Here you go. Hope it helps. In your case UDHOME not UVHOME(UniVerse)

clear.userno.map script.
MAIL=/usr/mail/${LOGNAME:?}
PATH=$PATH:/home/dw:/usr/uv/bin:/sbin:/usr/sbin:/usr/bin:/etc:/usr/spool/uv ; ex
port PATH
UVHOME=/usr/uv ; export UVHOME
UVBIN=/usr/uv/bin ; export UVBIN
NOCHKLPREQ=1 ; export NOCHKLPREQ
LPHOME=/usr/spool; export LPHOME
umask 000
TERM=vt100; export TERM
cd /dbms/live/TR
/usr/uv/bin/uv < /home/dw/clear.userno.map.input > /tmp/clear.userno.map.output
~~~~~~~~~~~
VOC commands script: clear.userno.map.input
USERLOGINNAME,PASSWORD,VT100
TCL

TIME
WHO
ED GLOBALVOC USERNO.MAP
L999
T
DE9999
FI
TIME
OFF

havolinec <member27252 (AT) dbforums (DOT) com> wrote

Hi all,

I've create a paragraph in VOC file:

Paragraph name - USERPARA

001: PA
002: GET.LIST USERSLIST
003: ECLTYPE U
004: LIST DIST.DATA USING DICT DIST.KC DIST.ID NAME.FULL AMOUNT TO DELIM
";" _HOLD_/TESTDATA.TXT
005: ECLTYPE P

I'm new in Unidata and Unix. I'd really appreciate if anyone could
provide some detail sample to create a shell script that will run the
above paragraph.

Thanks for any feedback.

Reply With Quote
  #4  
Old   
sdavmor
 
Posts: n/a

Default Re: Shell script to run paragraph - 06-25-2003 , 05:45 PM



Angelo Collazo wrote:

Quote:
Here you go. Hope it helps. In your case UDHOME not UVHOME(UniVerse)

clear.userno.map script.
MAIL=/usr/mail/${LOGNAME:?}
PATH=$PATH:/home/dw:/usr/uv/bin:/sbin:/usr/sbin:/usr/bin:/etc:/usr/spool/uv ; ex
port PATH
UVHOME=/usr/uv ; export UVHOME
UVBIN=/usr/uv/bin ; export UVBIN
NOCHKLPREQ=1 ; export NOCHKLPREQ
LPHOME=/usr/spool; export LPHOME
umask 000
TERM=vt100; export TERM
cd /dbms/live/TR
/usr/uv/bin/uv < /home/dw/clear.userno.map.input > /tmp/clear.userno.map.output
~~~~~~~~~~~
VOC commands script: clear.userno.map.input
USERLOGINNAME,PASSWORD,VT100
TCL

TIME
WHO
ED GLOBALVOC USERNO.MAP
L999
T
DE9999
FI
TIME
OFF
I went to school with an Angelo Collazo at Coleman College, back in
1980 when it was located in San Diego's Old Town. We were *fired*
from work-study for doing too much study and not enough work! That
wouldn't be you by any chance?

From your shell script I take it that you're supporting a DataWorks
(DataFlo, or whatever its officially called these days) user.
--
Cheers,
SDM -- a 21st century schizoid man (Steven Davies-Morris)
http://systemstheory.net internet music project
http://thecleanersystem.com software for dry cleaners
NP: nothing



Reply With Quote
  #5  
Old   
Angelo Collazo
 
Posts: n/a

Default Re: Shell script to run paragraph - 06-26-2003 , 01:23 PM



Steve, I'm not that person but I've been known to get in trouble my
self, and yes we are running the Epicor DataFlow ERP system since
1997.

Cheers,

sdavmor <sdavmor (AT) somewhereincyberspace (DOT) com> wrote

Quote:
Angelo Collazo wrote:

Here you go. Hope it helps. In your case UDHOME not UVHOME(UniVerse)

clear.userno.map script.
MAIL=/usr/mail/${LOGNAME:?}
PATH=$PATH:/home/dw:/usr/uv/bin:/sbin:/usr/sbin:/usr/bin:/etc:/usr/spool/uv ; ex
port PATH
UVHOME=/usr/uv ; export UVHOME
UVBIN=/usr/uv/bin ; export UVBIN
NOCHKLPREQ=1 ; export NOCHKLPREQ
LPHOME=/usr/spool; export LPHOME
umask 000
TERM=vt100; export TERM
cd /dbms/live/TR
/usr/uv/bin/uv < /home/dw/clear.userno.map.input > /tmp/clear.userno.map.output
~~~~~~~~~~~
VOC commands script: clear.userno.map.input
USERLOGINNAME,PASSWORD,VT100
TCL

TIME
WHO
ED GLOBALVOC USERNO.MAP
L999
T
DE9999
FI
TIME
OFF

I went to school with an Angelo Collazo at Coleman College, back in
1980 when it was located in San Diego's Old Town. We were *fired*
from work-study for doing too much study and not enough work! That
wouldn't be you by any chance?

From your shell script I take it that you're supporting a DataWorks
(DataFlo, or whatever its officially called these days) user.

Reply With Quote
  #6  
Old   
Ken Wallis
 
Posts: n/a

Default Re: Shell script to run paragraph - 06-29-2003 , 01:32 AM



havolinec wrote:

Quote:
I've create a paragraph in VOC file:

Paragraph name - USERPARA

001: PA
002: GET.LIST USERSLIST
003: ECLTYPE U
004: LIST DIST.DATA USING DICT DIST.KC DIST.ID NAME.FULL AMOUNT TO
DELIM ";" _HOLD_/TESTDATA.TXT
005: ECLTYPE P

I'm new in Unidata and Unix. I'd really appreciate if anyone could
provide some detail sample to create a shell script that will run the
above paragraph.
#!/bin/ksh
if [ -z "$UDTHOME" ]
then
export UDTHOME=/usr/ud
fi
if [ -z "$UDTBIN" ]
then
export UDTBIN=$UDTHOME/bin
fi
$UDTBIN/udt <<!END_UDT
USERPARA
QUIT
!END_UDT
exit $?

Cheers,

Ken




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.