Cant use $PROJDEF in a Parameter Set

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
rleishman
Premium Member
Premium Member
Posts: 252
Joined: Mon Sep 19, 2005 10:28 pm
Location: Melbourne, Australia
Contact:

Cant use $PROJDEF in a Parameter Set

Post by rleishman »

The runtime environment variable default $PROJDEF does not appear to work when the parameter is part of a parameter SET. Here's what I did:
  • Create an environment variable $ODMORASID in Administrator and give it a value of XYZ
  • Create a Parameter Set ODM including the $ODMORASID variable.
  • Set the default value for $ODMORASID to $PROJDEF in the param set.
  • Create a job that includes the parameter set. Job reads a single row from a sequential file and writes it to another sequential file.
  • The name of the second sequential file includes the parameter:

    Code: Select all

    /home/c985675/#ODM.$ODMORASID#.txt
    The parameter was inserted into the filename using the tool button, not typed in freehand.
When I run the job, I get a file called $PROJDEF.txt, rather than XYZ.txt as you would normally expect.

If I change the job to remove the parameter set and replace with a bog standard environment variable parameter defaulted to $PROJDEF, it works (after changing the env var ref in the file name of course).

I found one other unresolved post on DSX similar to this, but stony silence on Google. Can anyone help?
    Ross Leishman
    chulett
    Charter Member
    Charter Member
    Posts: 43085
    Joined: Tue Nov 12, 2002 4:34 pm
    Location: Denver, CO

    Post by chulett »

    You'd have to take this back to IBM, I would think, see if this is a known issue and if there are any patches to resolve it.
    -craig

    "You can never have too many knives" -- Logan Nine Fingers
    lstsaur
    Participant
    Posts: 1139
    Joined: Thu Oct 21, 2004 9:59 pm

    Post by lstsaur »

    Ross,
    I think your problem is due to missing a Parameter Name.
    Your Parameter Set's name is ODM, but what's your parameter's name inside of Parameter Set.
    So, what I am saying is instead of "#ODM.$ODMORASID#.txt", it should be something like "#ODM.parameter_name.$ODMORASID#.txt".

    The problem that I am having with the Parameter Set is that my job is working fine except the output dataset couldn't be viewed.
    rleishman
    Premium Member
    Premium Member
    Posts: 252
    Joined: Mon Sep 19, 2005 10:28 pm
    Location: Melbourne, Australia
    Contact:

    Post by rleishman »

    Thanks Craig, thought I'd try here first to see if I was doing something stupid (again).

    @lstsaur, not sure what you mean. $ODMORASID is the name of the parameter - it's an Environment Variable Parameter within the Parameter Set ODM. I'm pretty sure I have constructed the reference correctly in the File Name; if I hadn't I would get a file called #ODM.$ODMORASID#.txt rather than $PROJDEF.txt.

    What I'm saying is that the existence of the file $PROJDEF.txt proves that replacement of the string has occurred, it's just replaced it with the wrong string.

    I've discovered something else. When you run a job with a simple Environment Variable parameter set to $PROJDEF, the replaced value (defined in Administrator) shows in the Director job log. When you run a job with an Environment Variable from a Parameter Set set to $PROJDEF, the value that shows in director is "$PROJDEF".

    This is consistent with my finding that the file created was called $PROJDEF.txt

    I'll post back if I get any joy from IBM.
    Ross Leishman
    rleishman
    Premium Member
    Premium Member
    Posts: 252
    Joined: Mon Sep 19, 2005 10:28 pm
    Location: Melbourne, Australia
    Contact:

    Post by rleishman »

    Turns out it is a bug.

    Resolved in fixpak 1 for all platforms except SUSE Linux

    This is the link for fixpak 1 http://www-1.ibm.com/support/docview.wss?uid=swg24017220
    Ross Leishman
    Post Reply