Wednesday, 17 February 2016

never forget how cool parameterized URL’s are for getting back to JDE

These are great.  If you has a system that wanted to drill down into the details of a transaction, all you need to do is get the parameterized URL and adapt it for your use case.

Let’s say you had a demo account for our 9.2 system – simple:

http://myriad-it.com/news/jd-edwards-application-release-9-2-demo-now-available/ start here – register for an account, you should get one pretty quick (immediate email).

sign in http://e92demo.myriad-it.com/jde/E1Menu.maf

Goto address book

image

http://e92demo.myriad-it.com:80/jde/ShortcutLauncher?OID=P01012_W01012A_ZJDE0001&FormDSTmpl=|5|12|13|14|15|16|17|18|19|20|21|22|23|&FormDSData=| |8|O|1.00| | | || | | | | |

This was for the following screen

image

You can easy see that the 8 is for the AN8 on the detail screen, chnage that to any address book number and you’ll magically see it with your shortcut:  I changed the 8 to 1010, and now I see 1010

http://e92demo.myriad-it.com:80/jde/ShortcutLauncher?OID=P01012_W01012A_ZJDE0001&FormDSTmpl=|5|12|13|14|15|16|17|18|19|20|21|22|23|&FormDSData=| |1010|O|1.00| | | || | | | | |

image

You could create an easy formula in a spreadsheet for example to quickly drill down to your details

Server windoze build commands, package build history and proper build syntax


Good looking package DLL file:
PackageType=F
RunType=N
DLLName=CCUSTOM
PackageSource=C:\JDEdwards\E900\DDP\packages\PY900TMP\source\CCUSTOM
PackageInclude=C:\JDEdwards\E900\DDP\packages\PY900TMP\include\
PackageObjects=C:\JDEdwards\E900\DDP\packages\PY900TMP\obj\CCUSTOM
ParentObjLocation=
PackageBin32=C:\JDEdwards\E900\DDP\packages\PY900TMP\bin32\
PackageLib32=C:\JDEdwards\E900\DDP\packages\PY900TMP\lib32\
ParentSourceLocation=
ParentBin32Location=
ParentLibLocation=
ParentInclude=
JDESystemInclude=C:\JDEdwards\E900\DDP\system\include
JDESystemIncludeV=C:\JDEdwards\E900\DDP\system\includev
ParentLocation=
NTLibraryLocation=C:\JDEdwards\E900\DDP\system\lib32
BuildArea=C:\JDEdwards\E900\DDP\packages\
LogFile=CCUSTOM.log
LinkFile=CCUSTOM.log
StatusFile=C:\JDEdwards\E900\DDP\packages\PY900TMP\text\CCUSTOM.sts
CompileOutput=
DebugFlags=
OptimizationFlags=/FD /Gz /O2 /Zi /MD /W4 /EHsc /Gy /Oy-
Inlining=
TargetReleaseLevel=5.0
#define=/D "WIN32" /D "_WINDOWS" /D "IAMASERVER" /D "KERNEL" /D "UNICODE" /D "_UNICODE" /D "USESPECIALGPA4BB" /D "USETABLEHEADERFROMINCLUDEA"
CompilerOptions=/nologo /c
LinkOptions=/LIBPATH:C:\JDEdwards\E900\DDP\system\lib32 /DLL /DEBUG /SUBSYSTEM:windows /FORCE:MULTIPLE /FORCE:UNRESOLVED /INCREMENTAL:YES /VERBOSE /WARN:3
LinkObjects=jdekrnl.lib jdel.lib jdenet.lib jdeipc.lib owver.lib jdeunicode.lib v_verify.lib xerceswrapper.lib xmlpublisher.lib
StopOnError=N
UserName=JDE
PackageName=PY900TMP
SystemEnvInclude=include;atlmfc\include;PlatformSDK\Include;$(SYSTEM)\INCLUDE;$(SYSTEM)\INCLUDEV;$(SYSTEM)\CG;$(APP)\INCLUDE;
SystemEnvLib=lib;atlmfc\lib;PlatformSDK\lib;$(SYSTEM)\LIB32;$(SYSTEM)\LIBV32;$(APP)\LIB32;
SystemEnvPath=Tools;Tools\bin;bin;IDE
jdertdll
b5500095
b5500110
b5500160
b5500190
b5500200
Bad looking file
PackageType=F
RunType=N
DLLName=CCUSTOM
PackageSource=C:\JDEdwards\E900\DDP\packages\PY900TMP\source\CCUSTOM
PackageInclude=C:\JDEdwards\E900\DDP\packages\PY900TMP\include\
PackageObjects=C:\JDEdwards\E900\DDP\packages\PY900TMP\obj\CCUSTOM
ParentObjLocation=
PackageBin32=C:\JDEdwards\E900\DDP\packages\PY900TMP\bin32\
PackageLib32=C:\JDEdwards\E900\DDP\packages\PY900TMP\lib32\
ParentSourceLocation=
ParentBin32Location=
ParentLibLocation=
ParentInclude=
JDESystemInclude=C:\JDEdwards\E900\DDP\system\include
JDESystemIncludeV=C:\JDEdwards\E900\DDP\system\includev
ParentLocation=
NTLibraryLocation=C:\JDEdwards\E900\DDP\system\lib32
BuildArea=C:\JDEdwards\E900\DDP\packages\
LogFile=CCUSTOM.log
LinkFile=CCUSTOM.log
StatusFile=C:\JDEdwards\E900\DDP\packages\PY900TMP\text\CCUSTOM.sts
CompileOutput=
DebugFlags=
OptimizationFlags=/FD /Gz /O2 /Zi /MD /W4 /EHsc /Gy /Oy-
Inlining=
TargetReleaseLevel=5.0
#define=/D "WIN32" /D "_WINDOWS" /D "IAMASERVER" /D "KERNEL" /D "UNICODE" /D "_UNICODE" /D "USESPECIALGPA4BB" /D "USETABLEHEADERFROMINCLUDEA"
CompilerOptions=/nologo /c
LinkOptions=/LIBPATH:C:\JDEdwards\E900\DDP\system\lib32 /DLL /DEBUG /SUBSYSTEM:windows /FORCE:MULTIPLE /FORCE:UNRESOLVED /INCREMENTAL:YES /VERBOSE /WARN:3
LinkObjects=jdekrnl.lib jdel.lib jdenet.lib jdeipc.lib owver.lib jdeunicode.lib v_verify.lib xerceswrapper.lib xmlpublisher.lib
StopOnError=N
UserName=JDE
PackageName=PY900TMP
SystemEnvInclude=include;atlmfc\include;PlatformSDK\Include;$(SYSTEM)\INCLUDE;$(SYSTEM)\INCLUDEV;$(SYSTEM)\CG;$(APP)\INCLUDE;
SystemEnvLib=lib;atlmfc\lib;PlatformSDK\lib;$(SYSTEM)\LIB32;$(SYSTEM)\LIBV32;$(APP)\LIB32;
SystemEnvPath=Tools;Tools\bin;bin;IDE  <--- wrong!
jdertdll
b5500095
b5500110
b5500160
b5500190
b5500200

Note that you cannot just run the following command to build the DLL if you’ve changed the paths, as the package build process actually creates the text files reference with a kernel. 

C:\JDEdwards\E900\DDP\system\bin32\
builddll.exe C:\JDEdwards\E900\DDP\packages\PY900ODB\text\CCUSTOM.txt


So, despite the fact that you might have fixed all of the directories and you can run cl in your command window, the build is not going to kick off manually until you run it again.
You’ll see a line like this in the svrpkgbuild.log file in your packges\packagename\ dir, a line like the following

Tue Feb 16 18:08:14  -  Transferring File(s) to this enterprise server.
Tue Feb 16 18:10:11  -  Creating detail file for object CALLBSFN in package PY900ODB.
Tue Feb 16 18:10:11  -  Source and obj directories created for the DLL CALLBSFN successfully
Tue Feb 16 18:10:11  -  Creating text file for CALLBSFN
Tue Feb 16 18:10:11  -  Created detail file C:\JDEdwards\E900\DDP\packages\PY900ODB\text\CALLBSFN.txt successfully.
Tue Feb 16 18:10:11  -  Detail file created successfully.


Means that you can check that file – you’ll see that it’s been created again and the path is looking much better.  The build is not from "package build history", this does not always recreate the files, you might actually need to resubmit the build.

What I've seen is numerous builds is that some settings are not moved from the JDE.INI to the DLLNAME.txt file when a build is submitted with package build history.  You might need to resubmit the build officially.

A quick edit to this post.  If you want to get to the start of the start of the start (you cannot).  It seems that the txt files for the DLL builds are only created once.  Therefore if you change the LIB entries in your JDE.INI in the[JDE_CG] stanza, these are probably not going to be written to the DLL build instructions file.

Sometimes you don't have time to resubmit another build...  So here's a work around for some wrong JDE.INI file settings.  I've had to previous use the visual studio "replace in files" functionality (as below) to change the LIB path in all of the DLLNAME.txt files.  Reason I do this is that you need visual studio on your enterprise server, so you can easily drive this.  I forget all of the sed commands to do the same.


So this command has fixed all of my DLLNAME.txt files, so I can now manually test the build of a single DLL



cd C:\JDEdwards\E900\DDP\system\bin32\
buildmstr.exe C:\JDEdwards\E900\DDP\packages\PY900ODB\text CCUSTOM

note that I'm using the buildmstr command, not builddll.  You can just list your DLL's after the directory name and buildmstr will launch builddll's in the concurrency that is specified in the JDE.INI in [BSFN BUILD] SimultaneousBuilds=5

That is cool. ie

cd C:\JDEdwards\E900\DDP\system\bin32\
buildmstr.exe C:\JDEdwards\E900\DDP\packages\PY900ODB\text CCUSTOM CDIST CFIN 






Tuesday, 16 February 2016

cannot start windoze SM agent

 

Getting error starting the SM agent using “startAgent” or using the services app snap in.

It’m bombing out immediately, nothing in logs.

C:\jde_home\SCFHA\bin>startAgent
The service is not responding to the control function.

More help is available by typing NET HELPMSG 2186.

 

A similar unhelpful message when using the service start.

error 1053: the service did not respond to start or control request in a timely fashion.

I notice some strange characters around the start command…

image

C:\jde_home\SCFHA\bin\scfagent_64.exe าจ]//RS//SCFAGENT2

I then went sniffing around to see how the service was installed

C:\jde_home\SCFMC\bin\installAgentService.cmd

@echo off
SET CUR_DIR=%cd%
cd /d "%~dp0.."
SET JDE_HOME=%cd%
cd /d "%CUR_DIR%"

SET JAVA_HOME=%JDE_HOME%\jdk\jre

CALL %JDE_HOME%\bin\bitness-checker.bat > %JDE_HOME%\bin\bits
set /p BITS=<%JDE_HOME%\bin\bits

if %BITS%==64 GOTO do64

:do32
%JDE_HOME%\bin\scfagent.exe "//IS//SCFAGENT2" "--Description=SM Management Agent" "--DisplayName=SM Management Agent [%JDE_HOME%]" --Startup=auto --StartMode=exe "--StartImage=%JAVA_HOME%\bin\java.exe" "--StartParams=-Xrs;-classpath;%JDE_HOME%\lib\scfagent.jar;com.jdedwards.mgmt.agent.Launcher" "--LogPath=%JDE_HOME%\logs" --LogPrefix=installAgentService.log --LogLevel=DEBUG "--StdOutput=%JDE_HOME%\logs\stdout.log" "--StdError=%JDE_HOME%\logs\stderr.log"

GOTO EOF

:do64
%JDE_HOME%\bin\scfagent_64.exe "//IS//SCFAGENT2" "--Description=SM Management Agent" "--DisplayName=SM Management Agent [%JDE_HOME%]" --Startup=auto --StartMode=exe "--StartImage=%JAVA_HOME%\bin\java.exe" "--StartParams=-Xrs;-classpath;%JDE_HOME%\lib\scfagent.jar;com.jdedwards.mgmt.agent.Launcher" "--LogPath=%JDE_HOME%\logs" --LogPrefix=installAgentService.log --LogLevel=DEBUG "--StdOutput=%JDE_HOME%\logs\stdout.log" "--StdError=%JDE_HOME%\logs\stderr.log"


:EOF

Note that it looks normal here, I tried removing “, did not work.

regedit – to see the service definition.

image

remove the dodgy characters out of the path

image

A couple of starts later, and we were off!

I tried 100 different security things before I was able to fix this, what a pain!

Thursday, 11 February 2016

Monday, 8 February 2016

I’ve finally worked out ` in pl/sql (flea, flee, fle)

This should have occured before now, but it’s done.  Why is the title of this about `, because the ` command in shell will execute the internals of the command immediately.

I used to always run the results of a script, but I may never do that again, I’m now going to use execute immediate and a loop.  This has changed my scripting 100%.  This is going to save a lot of copy and paste.  I’ll need to work on doing commits, but I’m sure I can get that working too.

Thanks to my freidnly DBA Satheesh for this one!

BEGIN
   FOR R IN (SELECT owner, table_name FROM dba_tables WHERE owner in ('TESTCTL','TESTDTA','CRPCTL','CRPDTA')) LOOP
      EXECUTE IMMEDIATE 'grant select on '||R.owner||'.'||R.table_name||' to JDE_USERS';
   END LOOP;
END;
/

The above can be used instead of generating all of the “GRANT” statements and then running them with cut and paste.

Monday, 1 February 2016

OATS functional testing gone wrong

First problem was that I could not run any applications, see below:  This was from openscript, l

image

[1] no title

close window(“@index=’0’”)

Need to run openscript as administrator, and then you do not get this error.

image

I then had another issue that the workspace could not be opened. see file “c:\users\smoir\osworkspace\.metadata\.log”

In this file there were tons of errors, I removed the entire “osworkspace” folder and then openscript started.

Wow, now I can start functional testing.