Page 1 of 1

Cant use $PROJDEF in a Parameter Set

Posted: Tue Oct 02, 2007 5:17 pm
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?

    Posted: Tue Oct 02, 2007 5:37 pm
    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.

    Posted: Tue Oct 02, 2007 6:29 pm
    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.

    Posted: Tue Oct 02, 2007 8:57 pm
    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.

    Posted: Thu Oct 18, 2007 9:21 pm
    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