locked
CCP_NEW_JOB_ID environmental variable usage RRS feed

  • Question

  • Hello all,

    I have installed the latest HPC Pack 2012 R2 Update 3 where a new environmental variable is introduced, CCP_NEW_JOB_ID. According to What's New in HPC Pack 2012 R2 Update 3, "CCP_NEW_JOB_ID environment variable for the job new command. – With this variable you no longer need to parse the command output in your batch scripts".

    Until now, I was using the following recipe to submit jobs from batch (job submit Command Reference):

    for /f "usebackq tokens=4 delims=. " %%i in (`job new`) do (
    job add %%i echo Hello World
    job submit /id:%%i
    )

    This no longer works with the update. I try to use the CCP_NEW_JOB_ID like so:

    job new
    job add %CCP_NEW_JOB_ID% echo Hello World
    job submit /id:%CCP_NEW_JOB_ID%
    

    What I get is a job configuring with an ID, say 79 on the scheduler, a message saying that CCP_NEW_JOB_ID is set to 79 and the current job submitted as 78, i.e. with the id the environmental variable had before the execution of my batch.

    How is the new environmental variable supposed to be used?

    Regards,

    Costas





    • Edited by cyamin Tuesday, November 24, 2015 3:55 PM Code correction in second window
    Tuesday, November 24, 2015 3:54 PM

Answers

  • This issue has been addressed in our QFE. Check your command help, it should have "!!" to refer to the jobid you just created:

    C:\WINDOWS\system32>job add /?
    Syntax:
        job add <jobId|!!> [/customproperties:{name1=value1;name2=value2;...}]
                           [/depend:taskname] [/env:{name=value}]
                           [/exclusive:{true|false}]

    For example,

    job new job add !! echo Hello World job submit /id:!!


    Qiufang Shi

    Wednesday, July 20, 2016 1:07 AM

All replies

  • Correction:

    The old method works, in an unfortunate coincidence, the jobID's number of digits increased and had to increase the number of tokens I had to parse to get it. However, I still do not understand the proper use of the CCP_NEW_JOB_ID env variable. I would be great if anyone could shed some light.

    Costas

    Wednesday, November 25, 2015 8:35 AM
  • Sorry Costas,

        We also noticed the issue under your scenario. We are working on a QFE to be delivered soon to fix the issue.


    Qiufang Shi

    Wednesday, November 25, 2015 9:24 AM
  • Hello,

    Has this issue been addressed in the v7.1 release?

    Regards,

    Costas

    Tuesday, July 19, 2016 10:09 AM
  • This issue has been addressed in our QFE. Check your command help, it should have "!!" to refer to the jobid you just created:

    C:\WINDOWS\system32>job add /?
    Syntax:
        job add <jobId|!!> [/customproperties:{name1=value1;name2=value2;...}]
                           [/depend:taskname] [/env:{name=value}]
                           [/exclusive:{true|false}]

    For example,

    job new job add !! echo Hello World job submit /id:!!


    Qiufang Shi

    Wednesday, July 20, 2016 1:07 AM
  • Thank you for your reply! How do I install this QFE?

    Costas

    Monday, August 1, 2016 10:46 AM
  • You need at least this QFE: https://www.microsoft.com/en-us/download/details.aspx?id=50809 or the latest one: https://www.microsoft.com/en-us/download/details.aspx?id=52983


    Qiufang Shi

    Wednesday, August 3, 2016 7:31 AM