Topic
  • 1 reply
  • Latest Post - ‏2013-08-30T13:59:00Z by VolkerFriedrich
mckr
mckr
1 Post

Pinned topic %Subdate issue

‏2013-07-31T00:09:01Z |

Hi

I am using connect direct to transfer file to other server and then append date and time to the file name at source system.

here is the code snippet

&DT=%SUBDATE1

&TM=%SUBTIME

STEP1 COPY

<<. CODE TO TRANSFER FILE TO OTHER SERVER >>

IF  (STEP1=0) THEN

    STEP2 RUN TASK PNODE (PGM=WINDOWS)

 SYSOPTS=" CMD(MOVE /Y \\SERVER1\ABC.TXT \\SERVER1\ABC.&DT.&TM..TXT)"

<< REMAINING CODE>>

 

the file is successfully transferred to destination but the date and time is not appending correctly to file. the file name appears as abc%SUBDATE1%SUBTIME.TXT    the actual date value is not appended.  It is working fine in test region. Any changes to be done in connect direct engine? Appreciate quick response

Thank You

 

 

  • VolkerFriedrich
    VolkerFriedrich
    157 Posts

    Re: %Subdate issue

    ‏2013-08-30T13:59:00Z  

    Try putting double-quotes around the built-in variables. This sample works for me:

    TEST PROCESS
     
       &DT="%SUBDATE1"
        &TM="%SUBTIME"
        SNODE=VFRIEDRICH.460
    
     RUN TASK PNODE (PGM=WINDOWS)
        SYSOPTS="CMD(MOVE /Y \\SERVER1\ABC.TXT \\SERVER1\ABC.&DT.&TM..TXT)"
    
    PEND