Progress dbtool errors - sql

I am trying to run the Progress dbtool on our database but it is not working. I get to the proenv prompt as suggested by the documentation that I have. When I execute the dbtool against our database "access" (that's the name of our progress database)
Here are my steps:
[root#server ~]# cd /usr/dlc10.2B/bin
[root#server bin]# ./proenv
DLC: /usr/dlc10.2B
WRKDIR: /usr/wrk
OEM: /usr/oemgmt
OEMWRKDIR: /usr/wrk_oemgmt
Inserting /usr/dlc10.2B/bin to beginning of path and
setting the current directory to /usr/wrk.
OpenEdge Release 10.2B04 as of Thu Mar 3 19:14:26 EST 2011
proenv>dbtool access
/usr/dlc10.2B/bin/dbtool: line 2: DLC:: command not found
/usr/dlc10.2B/bin/dbtool: line 3: WRKDIR:: command not found
/usr/dlc10.2B/bin/dbtool: line 4: OEM:: command not found
/usr/dlc10.2B/bin/dbtool: line 5: OEMWRKDIR:: command not found
/usr/dlc10.2B/bin/dbtool: line 7: Inserting: command not found
/usr/dlc10.2B/bin/dbtool: line 8: setting: command not found
/usr/dlc10.2B/bin/dbtool: line 10: OpenEdge: command not found
/usr/dlc10.2B/bin/dbtool: line 12:
/usr/dlc10.2B/bin/dbtool: line 12: root#server:/usr/wrk
/usr/dlc10.2B/bin/dbtool: line 12: root#server:/usr/wrk: No such file or directory

What shell are you using?
Have you edited proenv?
proenv is a shell script. The errors that you report are simple shell variable assignments failing -- as if you are executing proenv with something other than "sh". The first few lines of proenv should be:
#!/bin/sh
# proenv
DLC="/usr/dlc"
WRKDIR="/usr/wrk"
OEM="/usr/oemgmt"
OEMWRKDIR="/usr/wrk_oemgmt"
PATH=$DLC/bin:$DLC/perl/bin:$PATH
PS1="proenv>"
export DLC WRKDIR PATH PS1 OEM OEMWRKDIR OEE OEEWRKDIR
#cd to the work directory
cd $WRKDIR
For that to fail you are either running a broken shell or someone has messed with the script.
By the way -- you should not need to be root to run dbtool. And you do not need to have your current directory in /usr/dlc10.2B/bin when you run proenv.
Actually dbtool should run just fine from a plain old command prompt so long as DLC is defined and $DLC/bin is in your PATH.

Related

problem trying to initiate a console with WSL 2 in CMDER

I have this error just trying to use WSL from cmder
wslbridge error: failed to start backend process
note: backend error output: -v: -c: line 0: unexpected EOF while looking for matchi ng `''
-v: -c: line 1: syntax error: unexpected end of file
ConEmuC: Root process was alive less than 10 sec, ExitCode=0.
Press Enter or Esc to close console...
does anyone how to solve it?
Create a new profile with the command wsl.exe.
Taken from https://github.com/Maximus5/ConEmu/issues/1930#issuecomment-512882561; it works for me.
For anybody having problems with this, I finally figured it out by setting a new task command of:
wsl.exe ~ -d Ubuntu-20.04
In my case, I had two versions of WSL installed and it wouldn't take the newer in Cmder for anything—it always loaded the ~ directory of my older install. You can use the file browser and go to directory \\wsl$ to see which version of WSL you are using.
I found this solution:
It is a ConEmu thing. The whole WSL part is for WSL version 1, I guess you are running WSL version 2?
You need a new version of cygwin1.dll
Grab one here: https://cygwin.com/snapshots/
Go to vendor\conemu-maximus5\ConEmu\wsl and replace the dll.
You need wslbridge 2:
Grab it here: https://github.com/Biswa96/wslbridge2/releases (the cygwin version)
Copy the content to the same directory: vendor\conemu-maximus5\ConEmu\wsl
Now edit your WSL bash task:
Replace the part "conemu-cyg-64.exe --wsl" with "conemu-cyg-64.exe %ConEmuBaseDirShort%\wsl\wslbridge2.exe"
It works now.

Issue with running Ubuntu App on Windows 10

Hi I have this problem why following the steps to generate SSL certificate using Letsencrypt here.
However when I run the command ./certbot-auto certonly -a standalone -d example.com -d www.example.com I got this problem:
: not founduto: 13: ./certbot-auto: : not founduto: 15: ./certbot-auto:
I'm sending a snippet for reference:
I would appreciate any help on how to fix this. Thank you.
The fact that the : is at the start of the line indicates you you have CR/LF line endings. You can verify this with od -xcb certbot-auto and checking for the \r\n line endings.
The error message generated would be something like:
./certbot-auto: 13: ./certbot-auto: <cr>: not found
with the bit after the <cr> overwriting the start of the message, making it look like (what you can see):
: not founduto: 13: ./certbot-auto:
So first step is the run something like dos2unix over your shell script and fix the line endings:
dos2unix certbot-auto
That should change the line endings and hopefully make it runnable.

Setting {WSL::Bash} as default shell throws an error in cmder

note: backend error output: -v: -c: line 0: unexpected EOF while looking for matching `''
-v: -c: line 1: syntax error: unexpected end of file
ConEmuC: Root process was alive less than 10 sec, ExitCode=0.
Press Enter or Esc to close console...
This is error i am getting.
Also i have set the fish shell as default shell in WSL.
For WSL1 on windows 10 build later than 1909 (yes wsl2 is available to me but for corporate reasons i cant use it)
Try setting your command to wsl.exe -new_console:d:C:\_stuff\code -cur_console:p5 and the task parameters to /dir "c:/_stuff/code" /icon "c:/_distros/ubuntu/ubuntu1804.exe"
You may need to change the file locations to make the command and parameters suitable for your setup. c:/_stuff/code is where i keep all my repositories and c:/_distros/ubuntu is where i have installed ubuntu.

Can't install phantomjs on server

I'm having a difficult time getting phantomjs installed on my server. I haven't found very good directions anywhere and the best I've found give me errors when I try to complete them. As of now I'm following these steps and getting these errors.
Successfully used putty to login as root and run the following commands
Line 1: yum install fontconfig freetype freetype-devel fontconfig-devel libstdc++
No errors
Line 2: wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-x86_64.tar.bz2
No errors
Line 3: mkdir -p /opt/phantomjs
No errors
Line 4: tar -xjvf ~/phantomjs-1.9.8-linux-x86_64.tar.bz2 --strip-components 1 /opt/phantomjs/
Error: opt/phantomjs: Not found in archive
For this error (line 4) I ftp into my server and didn't see any directory for opt/phantomjs. I created one but am having the same "Not found in archive" error.
After this the only other lines of code, from what I've found, should be:
Line 5: ln -s /opt/phantomjs/bin/phantomjs /usr/bin/phantomjs
Line 6: phantomjs /opt/phantomjs/examples/hello.js
If anyone has any insight I'd greatly appreciate it!
Well after a lot of trial and error it seems to be working (so far). The problem was the syntax of line 4. This solved the issue and line 5 and 6 worked fine.
UPDATED LINE 4: tar -xjvf ~/phantomjs-1.9.8-linux-x86_64.tar.bz2 --strip-components=1 -C /opt/phantomjs/
Hopefully this helps someone else having the same issue.
Anyone know of a good tutorial on using it for highcharts in php?
I used this command to place the binay in /usr/local/bin
curl -Ls https://github.com/Medium/phantomjs/releases/download/v1.9.19/phantomjs-1.9.8-linux-x86_64.tar.bz2 | tar jxvf - --strip-components=2 -C /usr/local/bin/ ./phantomjs-1.9.8-linux-x86_64/bin/phantomjs

Random error in Unix shell script

I have a shell script which in turn calls sql file. Its a bash shell running in UNIX. Following is the main steps taken in script.
1) Generate Term file
2) Remove previous day's Term and Rpt file from utility directory.
3) Copy Term file from Run directory to Utility directory.
4) Run the sql file
5) Copy the output, RPT file from Utility to Run directory.
Here is the code snippet:
> RUN_DIR/nj.terms
if [[ -s RUN_DIR/nj.terms ]] then
rm -f /utl/nj.terms
rm -f /utl/nj.rpt
cp RUN_DIR/nj.terms utl
/bin/sqlplus USER PSWD #sql
cp utl/nj.RPT RUN_DIR
fi
I get following error from sql output as :
ORA-29283 - Invalid file operation.
Mostly this error is due to absence of Term file whenever the sql runs. Due this error RPT file will not be generated and cause failure in following copy command (cp utl/nj.RPT RUN_DIR).After the failure, when we checked the Term file ,it was present in Utl directory.
This error occurs randomly. Is there any chance system takes more time to copy the Term file to Utility directory and before completing it sql was run? It would be great if someone can help me in this situation.