Automic Community

Expand all | Collapse all

Problems setting up logical resource

Jump to Best Answer
  • 1.  Problems setting up logical resource

    Posted 10-11-2018 03:17 PM

    Hi guys,

    I have a problem working with logical resources.  Here is what I've done so far...

     

    I have 2 sessions using 2 different MUs.  The 2 sessions are being started at the same time.  However, a UPROC in one of the sessions has to wait to be executed until the second session is completed.  So I would like to hold an exclusive resource in the first session, and setup that UPROC in the second session so that it verifies if the resource is available before being executed.

     

    I have created a logical resource with the following parameters:

    Deallocation mode: Manual

    Access mode:  Exclusive

     

    I have added the following script in the header/footer of the first session:

    HEADER>>

    uxhld res res=BR_R_DAILYSUF_DONE lock

    FOOTER>>
    uxrls res res=BR_R_DAILYSUF_DONE clear

     

    And I added a resource condition in the UPROC’s launch formula with proposition properties = Expected.

     

    In my testing process, I start the first session and the second one after 2-3 minutes. The UPROC in the second session is set to “Event Wait” mode. In it's “History Trace”, I can see the following information:

     

    20181011150342 Start Condition Check

                      Processing Date 20181011

     

    Resource     Cond. 001 Prop. 01 :

     

    Resou.: BR_R_DAILYSUF_DONE

             LOG Missing

    *** Task launch refused ***

    When the first session finishes, the execution of the UPROC starts. So far so good.

     

    But when I start only the second session, the UPROC still turns in “Event Wait” mode. Even if the resource hasn’t been holed by any other session.

     

    There is something wrong with my setup. Can you please help me out?

     

    Thanks in advance for your time,

    Mylene



  • 2.  Re: Problems setting up logical resource

    Posted 10-16-2018 05:17 AM

    Could you check in "Resource Events" if the Resource is not displayed?

    In case it does, click on "Free".

     

    Else, send us the results of the commands "uxshw res full" and "uxshw upr upr=UPROC_FROM_SESSION2"



  • 3.  Re: Problems setting up logical resource

    Posted 10-16-2018 10:26 AM

    The resource is displayed in the "Resource Events". However, it doesn't display that it has been allocated.  When I click on "Free", my UPROC starts.(???)

    Results of commands requested:

    C00-SUPPORT-SITE DEBUT

    C00-SUPPORT-SITE WSPGM-CODNOEUD BrAppSrvDev

    _!================================================

    _!**

    $!** PROCEDURE .. : BR_TEST_MYLENE

    $!** VERSION .....: 000

    $!** EXECUTION .. : 0007462

    _!**

    _!** PROCESS DATE : 10/16/2018

    _!**

    _!------------------------------------------------

    $!** PARAMETERS. : None

    _!------------------------------------------------

    _!** VARIABLES

    _!------------------------------------------------

    $!** INHERITANCE VARIABLES

    _!================================================

    Time is 1020

    Command : uxshw res res=BR_R_DAILYSUF_DONE full esp=* mu=* pdate=* tsoc=* partage

     

    Query Res: * * * * *

    Use of resource quotas

    Resource: BR_R_DAILYSUF_DONE     Mode: EXCL Exec: EXCL

    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Quotas maxi   Auto. Alloc.     Man. Alloc.     Remainder  

    0000   0000   0000 0000       0000 0000       0000 0000

     

    Use of resource quotas

    Resource: BR_R_DAILYSUF_DONE STCDEV X BR_DEVELOPMENT_APP1 Mode: EXCL Exec: EXCL

    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Quotas maxi   Auto. Alloc.     Man. Alloc.     Remainder  

    0000   0000   0000 0000       0000 0000       0000 0000

     

    Use of resource quotas

    Resource: BR_R_DAILYSUF_DONE STCDEV X BR_DEVELOPMENT_SNAPSHOT_DATABASE Mode: EXCL Exec: EXCL

    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Quotas maxi   Auto. Alloc.     Man. Alloc.     Remainder  

    0000   0000   0000 0000       0000 0000       0000 0000

     

    Command : uxshw upr upr=BR_A_SI_GSUF_FINAL.SNAPSHOT.RELEASE.FACT.ALLOC vupr=* partage

     

    TYPE | upr

     

    ITEMS | upr         : BR_A_SI_GSUF_FINAL.SNAPSHOT.RELEASE.FACT.ALLOC

           | vupr         : 000

           | class        :

           | clfil       :

           | label       :

           | dom         : I

           | appl         : U_

           | upt         : CL_INT

           | definfo     :

           | defsev       : 0000

           | retry       :

           | fperiod     : d

           | memo         : a

           | nbper       : 0

           | command     :

           | execdir     :

           | shell       :

           | shellarg     :

           | nointeractive

           | incclass         : ( )

           | successor       : ( )

           | launchvar       : (

                             [

                             varname     : NEXT_TASK1

                             vvalue       : BR_T_SI_GSUF_FACTOR.ALLOCATION

                             vtype       : T

                              vformat     : 255

                             valmin       :

                             valmax       :

                             ]

     

                          

                             [

                             varname     : ENV

                            vvalue       : %ProcessEnvironment%

                             vtype       : T

                             vformat     : 30

                             valmin       :

                             valmax       :

                             ]

     

                          

                             [

                             varname     : SASServer

                             vvalue       : %SASServer%

                             vtype       : T

                              vformat     : 20

                             valmin       :

                             valmax       :

                             ]

     

                           )

           | depcon           : ( )

           | inccon           : ( )

           | rescon           : (

                             condno       : 01

                             res         : BR_R_DAILYSUF_DONE

                             pdate       : ( , , )

                             mu           : same

                             one          

                              expected      

                             nofatal      

                             attrib       :

                             value       :

                             lock          

                             qt1         : 0

                              qt2         : 0

                             noverif      

                           )

           | termins         : ( )

           | formula         : ( =C01 )

           | maxdur       : (,)

           | mindur       : (,)

           | maxwdur     : (,)

           | sap_xbp2         : ( )

           | sap_xbp2_step   : ( )

           | sap_xbp2_step_pr : ( )

           | sap_xbp2_step_ar : ( )

           | sap_pchain       : ( )

           | sap_ipack       : ( )

           | ftp_get         : ( )

           | ftp_put        : ( )

           | ejb             : ( )

           | ejb_param       : ( )

           | create_param     : ( )

           | notify           : ( )

           | upr_status       : ( )

           | oapp_pgm         : ( )

           | oapp_pgm_printop : ( )

           | oapp_pgm_param   : ( )

           | oapp_set         : ( )

           | oapp_set_printop : ( )

           | oapp_set_param   : ( )

           | mssql           : ( )

           | mssql_notif_email     : ( )

           | mssql_notif_page     : ( )

           | mssql_notif_netsend   : ( )

           | mssql_notif_eventlog : ( )

           | mssql_step       : ( )

           | mssql_step_adv   : ( )

           | mssql_ref       : ( )

           | rest       : ( )

           | rest_header : ( )

           | rest_urlprm : ( )

          | rest_filprm : ( )

           | rest_body   : ( )

           | rest_status : ( )

           | rest_output : ( )

           | soap       : ( )

           | soap_conf   : ( )

           | soap_status : ( )

           | soap_input : ( )

           | soap_output : ( )

           | zos         : ( )

           | zos_output : ( )

           | script       :

     

    ==================================================

    @ECHO OFF

    REM ==============================================================

    REM Internal Uproc sample script for Windows

    REM ==============================================================

     

    ECHO Starting...

    SET resexe=1

    SET FLAG="PRELIM_SUF_FLAG=%S_P1%"

     

    ECHO Environment = %ENV%

    ECHO SASServer = %SASServer%

    ECHO FLAG = %FLAG%

     

    ECHO %UXEXE%\UXORDRE NODE=%SASServer% ESP=X MU=BR_%ENV%_APP2 TSK=%NEXT_TASK1% LAUNCHVAR=%FLAG%

    %UXEXE%\UXORDRE NODE=%SASServer% ESP=X MU=BR_%ENV%_APP2 TSK=%NEXT_TASK1% LAUNCHVAR=%FLAG%

     

     

    set ERR=%ERRORLEVEL%

    ECHO ERRORLEVEL = %ERR%

    if %ERR%==0 (

    set resexe=0

    goto :END

    )

     

    :END

    ECHO End.

     

    ==================================================

    Time is 1020

    copy "D:\Applications\WLA\DUAS\STCDEV_BrAppSrvDev\log\exp\XB000000004U000000327.0007462" \\fld6filer\brsSystems\BPMS\Logs\STCDEV\BrAppSrvDev-BR_DEVELOPMENT_APP1--BR_TEST_MYLENE-20181016-1020.log

           1 file(s) copied.

     



  • 4.  Re: Problems setting up logical resource

    Posted 10-16-2018 10:29 AM

    I forgot to say that it's went I "FREE" the resource BR_R_DAILYSUF_DONE STCDEV X BR_DEVELOPMENT_SNAPSHOT_DATABASE that it releases the UPROC.



  • 5.  Re: Problems setting up logical resource
    Best Answer

    Posted 10-16-2018 11:40 AM

    Looking at the uxshw res, I would say that you have several UG that have taken that resource.

     

    In the condition, you specify that you want to have the resource of the MU 2 that launches the Session 2 free:

           | rescon           : (

                             condno       : 01

                             res         : BR_R_DAILYSUF_DONE

                             pdate       : ( , , )

                             mu           : same

     

    Whereas, if I understand correctly, you are liberating the resource allocated in Session 1, which corresponds to the MU 1.

     

    Therefore, you should either modify the condition and put mu: any and / or modify the command uxhld / uxrls adding the MU 2 in the uproc of the session 1.

     



  • 6.  Re: Problems setting up logical resource

    Posted 10-17-2018 07:39 AM

    I added a release command in the footer of my second session, and it worked!  Thanks a lot for you help :-)