Thursday, 29 July 2010

Things you can do with JDE that people say you can’t

 

Q:  Can I print automatically with any version of JDE?  Can I print something twice?  Can I email a report to myself when complete?  Can I move large reports to a certain directory / alternate storage so that viewing the file won’t crash my webserver. 

A:  Yes, yes, yes you can use an OSA (Output Stream Access) program to automatically do “Anything” with a PDF file after it has been written.  I’ve used OSA’s to calculate the size of the PDF file and then substitute it with another file.  The other file gives the end user a URL to get the large PDF without killing the JVM or using the JVM memory!  OSA’s can automatically email a job to an end user once it has completed…  They are quite cool.

OSA’s have like an OCM for the UBE’s.  You can say for this user / version / ube / environment combo, automatically call this OSA.

Of course the new releases have functionality to printImmediate for a version with a flag on the BV, which is very handy too.  Although this does not allow for the printing twice, or emailing or other funky things.

Saturday, 24 July 2010

dumb question – PK vs. unique index

Why does JDE have primary keys defined with the same columns as unique indexes?  I do not get it.  I’d guess that they take up the same space.  The DB is not going to allow the unique index to be “violated”, so why have the PK as well.  Can anyone tell me?

datapump nightmares

give me the old imp/exp

if someone gives you a simple task to datapump your way to victory, don’t trust em.

Datapump uses this thing called a directory to tell it where to grab the dump files from.

The parfile will look something like:

# PY impdp parfile
schemas=PRODCTL,PRODDTA
remap_schema=PRODCTL:CRPCTL,PRODDTA:CRPDTA
table_exists_action=truncate
content=data_only
directory=data_pump_myriad_dir
dumpfile=prod.dmp
logfile=crp_impdp.log  
job_name=crp_impdp

Note that this has the remap, which is guaranteed to generate REDO – thanks oracle!

But where is this pointing to? directory=data_pump_myriad_dir

look no further than: SELECT * FROM DBA_DIRECTORIES !  OF course you think!

Use the following to create a directory in the table:

create directory some_dir;
grant read, write on directory some_dir to micky_mouse;

Thursday, 22 July 2010

Remove most of the data out of a table

I’ve been asked to archive off most of the data from a test environment.

As per usual, most of the data is in about 10 tables, that makes my job easy.

Client tells me I can use UPMJ to cull data, my job is easier…

Use this script

It’s pretty cool.

Essentially it:

  • drops all indexes
  • drops constraints
  • renames table
  • recreates original table
  • inserts required records
  • drops the renamed edition
  • generates all indexes

When you try and delete 90% of a large table, it’s going to kill the temp table space and redo if archive logging is enabled.  This method reduces the amount of temp needed and also reduces the amount of redo.  It creates nice contiguous tables and indexes too.

See that it does the security once again, because you are creating the table!

Environment refresh – ripper

So you have a oracle jde instance, say e1prod.  It’s 300GB and archive logging is enabled.

How are you going to refresh this sucker?  R98403 is going to take an epoch and also is going to generate too much redo.  row at a time, table at a time…  This is not going to be your friend.

so, I’ve created some scripts to get the job done, and generate no logging!  You cannot use data load or imp export because it forces redo logging when you do an owner remap.

I’ve developed a script that will create all of the metadata for you.  You need to create some ‘NOLOGGING’ clauses in some of the statements and change the owner in some of the statements.

so run this: script

then edit:

generateIndexes.sql

GeneratePKs.sql

change  “COMPUTE STATISTICS” to “COMPUTER STATISTICS NOLOGGING”

Change PRODDTA to UADTA

Then run something like this script:

Note that this script also sizes your tables properly, like an import export.

I did change the PCT_INCREASE for the INDEX and PK files to 30%, because these we set to the default amount.

Tuesday, 20 July 2010

JDE.INI More entries that you could poke a stick at

Blogger, you make it ssoooooo hard up upload files.

I wanted to find the setting in the JDE.INI file to delay the UBE from starting so I could attached the debugger and step through the code on the server…  And I found this coool document, but I cannot seem to upload it to my blog.

All JDE.INI settings here

I’m working on something else, but in the meantime, here is that setting:

[DEBUG]

RunBatchDelay=60

Tuesday, 13 July 2010

jdedebug jde.log the last line might not be the last line!

I’m using 8.98.1.1 – seems to be fairly solid release.

Doing some debugging on the server and the clients and they are telling me that a call to some DecimalTriggerGetByLT_CO_CRCD function, but it’s actually not.

There are a few debug lines that are not being flushed from the stdout / stderr.

When I debug the process through msdev, I put the Output=BOTH setting on for [DEBUG].  This has the affect of writing stdout to a window “Debug” in visual studio.  It’s slow, but it’s cool.

You then see the flushed io and the actual last statement that is being run, a cheeky select on the F03B11!!

So remember that your debug logs might be lying to you.

I think that there is a flush setting for the JDE.INI [DEBUG] stanza, but I don’t know what it is.

Wednesday, 7 July 2010

Run applications on FAT or WEB client

What’s more politically correct?

Fat client?  Thick client?  They are both a little offensive.  Oh well…

When you are writing a quick app and the local CNC cannot get the local web running, what are you going to do?  That right, use the FAT boy for a quick test.

image

That’s right, edit the SIANSIF flag in F9860 for your application. 

W – Web Only

‘  ‘ – both  (NEEDS TO BE 1 SPACE)

C – client only

update ol812.f9860 set siansif = ' ' where siobnm = 'P55SCPXY' ;

remember to commit;  It must be a space too, not a ‘’ or null

Then OMW will look like:

image

Ahh, that’s better.

Warnings about this:

  • this is not good for testing, things DO NOT behave the same of FAT and THEN
  • Events can fire differently between the two environments
  • Do NOT use this for testing production bound code, naughty
  • You should use local web for testing, really.  Some form types do not work with the FAT

Tuesday, 6 July 2010

green screen admin menu on 400 not coming up, new release

go jdeow/a98owmnu

Just in case you’re not seeing it properly.

sick of “ksh: /usr/bin/ls: 0403-027 The parameter list is too long.”

 

 

Running ls –l *.jdedebug.log and get “ksh: /usr/bin/ls: 0403-027 The parameter list is too long.”

use:

find . -name "*jdedebug.log" -exec ls -l {} \;

Extending JDE to generative AI