Automic Workload Automation

Expand all | Collapse all

Static VARA

Judith Gitahi

Judith GitahiApr 08, 2015 11:37 AM

  • 1.  Static VARA

    Posted Apr 07, 2015 12:33 PM

    Is there a way a static VARA could read FILELIST.VARA and the process tab of a JOBS?

    I am trying to create a process that moves files from one server to another, and then creates folders on the 'to' servers, then places the moved files in appropriate folder (depending on the file name).

    Is that something that UC4 can do? If so, how? Please help.




  • 2.  Static VARA

    Posted Apr 07, 2015 12:54 PM
    Judith:

    Is this request associated with these previous discussions?


    If not, please be a bit more specific with your requirements.  Since a Variable is an Active Object class it really can’t “read” anything.  I’m on OM V8 and am not familiar with what a “FILELIST.VARA” references.



  • 3.  Static VARA

    Posted Apr 07, 2015 01:06 PM

    Hi Mark

    Yes, the question is associated with those previous discussion. Let me try to be more specific.

    I am using AE V9.

    VARA.FILELIST is a type of variable that lists all the files on a specific server directory. I already have that part.

    I also have the JOBF that transfers the files from one server to another.

    I have a JOBS that processes the VARA.FILELIST then changes the name from P1234567 to 1234.

    Now am trying to create something that reads the '1234' then creates a folder (directory) on the destination server and then it moves the 1234 to the appropriate folder depending on the folder name. For instance, if the files are P12345673.png and P12349899.png, a folder named 1234 should be created, then the two files are put in that folder.

    Hope it's a bit clearer now.





  • 4.  Static VARA

    Posted Apr 07, 2015 01:23 PM
    Under V8 I would have used the PREP_PROCESS_FILENAME statement (I guess). 

    Since you now apparently have the list of file names you can create a Job object that determines the named files that need a new directory and in the Process tab create the appropriate Unix "mkdir" or Windows "MD" command and then use the appropriate host command to move the file.

    You might also consider using the PREP_PROCESS statements to execute the directory and move commands "directly" in, for example, a Script object.


  • 5.  Static VARA

    Posted Apr 07, 2015 04:11 PM
    @Mark, how do I create a job object that determines the named files that need a new directory?


  • 6.  Static VARA

    Posted Apr 07, 2015 04:50 PM
    This is getting a bit convoluted in my mind as your requirements are apparently spread over three discussions.  You say that: 

    I also have the JOBF that transfers the files from one server to another.

    I have a JOBS that processes the VARA.FILELIST then changes the name from P1234567 to 1234.
    so I would have expected that you already have the needed pieces as you showed bits of the script logic that apparently gives you the desired results.  It seems to me that between Jesicia's responses and mine you should have what you need.

    I might suggest that perhaps it would be easier if you ended these existing discussions and started a fresh one will all of your requirements in a single place.  You should make them as clear as possible and show examples of a couple of complete file names and paths in the source and target directories.  

    What you are describing (I think) is something that we do routinely so it does not appear too difficult.  But as they say, the devil is in the details.  I'd be happy to provide some pseudo code or an approach if I can get a concise set of requirements that I can wrap my brain around. 




  • 7.  Static VARA

    Posted Apr 08, 2015 09:04 AM

    Sorry for the confusion. I was confused as well when I was explained the task. I misunderstood it the first time, but now I think I got it. I will try and break down the whole process in here. Forget what I said on the first two posts.

    #1)Move the files from one server to another. I already have the JOBF.

    #2)Have a JOBS that drops the first letter and reads the subsequent four numbers (fromP0297895623to0297)

    :DEFINE &STRING#, STRING
    :DEFINE &FILE#, STRING
    :set &HND# = PREP_PROCESS_VAR(VARA.FILELIST.MRA)
    :PROCESS &HND#
    :  SET &FILE# = GET_PROCESS_LINE(&HND#,1)
    :  SET &STRING# = MID("&FILE#", 2,4)
    :  PRINT &STRING#
    :ENDPROCESS
    :PRINT &FILE#
    :PRINT &STRING#

    Results

    2015-04-08 08:53:43 - U00204080297
    2015-04-08 08:53:43 - U00204080297
    2015-04-08 08:53:43 - U00204080314
    2015-04-08 08:53:43 - U00204080314
    2015-04-08 08:53:43 - U00204080314
    2015-04-08 08:53:43 - U00204080326
    2015-04-08 08:53:43 - U00204081745
    2015-04-08 08:53:43 - U00204081776
    2015-04-08 08:53:43 - U00204081776

    #3)Based on the generated results from#2, (0297), have an object read the 0297 and create a new directory named0297 and drop all the files that have0297 in that folder. (I still don't have that part yet)

    I appreciate your help.



  • 8.  Static VARA

    Posted Apr 08, 2015 11:24 AM
    I'm not trying to sound too pedantic but since you are not providing the asked for detail requirements, it will be difficult for me and perhaps anyone else to respond with any precision.

    For example, knowing what the full file names and paths are one could possibly use the wildcard feature of File Transfer objects and minimize the number of separate executions.  But without that and other information one can only guess.

    Sorry. :'(


  • 9.  Static VARA



  • 10.  Static VARA

    Posted Apr 08, 2015 11:40 AM

    The first screenshot is the filenames. Those are just a few that I am testing now, but eventually, I will be moving hundreds of files with similar naming convention.

    I also attached the JOBF.

    Is there anything else I missed?



  • 11.  Static VARA

    Posted Apr 08, 2015 12:05 PM
    If the From/SCR file is 
    d:\MRAtest\P0297053.jpg
    what will the file be for the To/DST, something like
    d:\P0297\P0297053.jpg

    Are all of the file extensions the same, i.e. jpg, or can there be different types?

    As a note: if these are truly jpg type files I would use a Format of Binary and not Text. 


    p.s. I can't figure out how to stop the forum from inserting an emoji when it encounters a upper case d:\ so I use a lower case letter.

     



  • 12.  Static VARA

    Posted Apr 08, 2015 01:03 PM

    As far as I know, all the files are .jpg. I will change the format to Binary. Thanks.

    Since there are hundreds of files to be moved, how do I move all the files with only one JOBF, and put them in the right directory?

    I know I can use something similar to this to create a new directory.  --if not exist "d:0297" mkdir\Pnumber\0297



  • 13.  Static VARA

    Posted Apr 08, 2015 01:10 PM
    Did I guess correctly regarding the To/From names?


  • 14.  Static VARA

    Posted Apr 08, 2015 02:00 PM

    From    d:\MRAtest\P0297053.jpg

    To        d:\Pnumber\0297\P0297053.jpg



  • 15.  Static VARA

    Posted Apr 08, 2015 02:48 PM
    How does the VARA.FILELIST.MRA Variable object get populated? 


  • 16.  Static VARA

    Posted Apr 08, 2015 02:55 PM
     Here's a screen shot of the object. When you click preview, it lists all the files in the directory.n4cwbo02x8m8.pnghttps://us.v-cdn.net/5019921/uploads/editor/t6/n4cwbo02x8m8.png" width="852">


  • 17.  Static VARA

    Posted Apr 08, 2015 03:56 PM

    Given what you have provided here is the way I would approach this process.  This is obviously the “gross” logic and does not include the details such as handling the first and last occurrences of the change to the &pnum variable or error processing for possible failures.  Again there are many ways to accomplish this, but I believe that this approach has the fewest number of “moving parts”.  Reminder, I am using OM V8 and make the assumption that this will all operate under your version.

    Create a Script object that “drives” the File Transfers; it performs the following:

    1. Process the variable using the PREP_PROCESS_VAR function.

    2. For each returned line in the PROCESS data sequence p**** and save the first four numbers of the file name in a script variable such as &pnum.

    3. If &pnum changed from previous value then perform the following:

       a. Use a PREP_PROCESS to the To/DST host to create the needed directory.

       b. Analyze results from command as required.

       c. If directory created:

           i. PSET a variable with From/SRC path, i.e. d:\MRAtest\P&pnum *.jpg

          ii. PSET a variable with the To/DST path, i.e. d:\Pnumber\&pnum \P&pnum *.jpg

         iii. Execute a File Transfer object using ACTIVATE_UC_OBJECT with the WAIT and PASS_VALUES parameters.  The file transfer’s Process tab contains PUT_ATT statement to set the FT_SRC_FILE  and FT_DST_FILE from the PSETed passed variables.

    So, if there are 10 files and 4 distinct &pnum values, the script will have activated the file transfer 4 times and each transfer will send the corresponding files that match the wildcard.

    Hope this helps and that I didn't miss something.



  • 18.  Static VARA

    Posted Apr 09, 2015 10:56 AM

    Hi Mark,

    This is what I have so far. I am stuck on #3.

    (This is a SCRIPT object)

    :DEFINE &FILE#, STRING
    :SET &HND# = PREP_PROCESS_VAR(VARA.FILELIST.MRA)
    :PROCESS &HND#
    :PSET &FILE# = GET_PROCESS_LINE(&HND#,1)
    :PSET &FOLDER# = MID("&FILE#", 2,4)
    :SET &TRANSFER# = ACTIVATE_UC_OBJECT(JOBF.MRA.TEST,,,,,PASS_VALUES,,&FILE#)
    :ENDPROCESS
    :PRINT &FILE#
    :PRINT &FOLDER#

    Did I do the first two parts correctly?



  • 19.  Static VARA

    Posted Apr 09, 2015 11:29 AM
    Which part of #3, detecting that &pnum has changed or the entire process?  Once you answer that I will know how to respond to your question.


  • 20.  Static VARA

    Posted Apr 09, 2015 11:52 AM

    How does this look? I tried the rest of #3 while waiting for your response. The script below doesn't create new folders on the DST server. What am I doing wrong?


    :DEFINE &FILE#, STRING
    :DEFINE &PNUM#, STRING
    :SET &HND# = PREP_PROCESS_VAR(VARA.FILELIST.MRA)
    :PROCESS &HND#
    :PSET &FILE# = GET_PROCESS_LINE(&HND#,1)
    :PSET &pnum# = MID("&FILE#", 2,4)
    :ENDPROCESS
    :SET &HNDA# = PREP_PROCESS("WINDEVAGT2.WIN", "WINCMD",,"CMD=if not exist d:0297 mkdir\Pnumber\0297",,"UC_LOGIN=LOGIN.UC4.WIN"))
    :PSET &SOURCE#="D:\MRAtest\P&pnum#.*.jpg"
    :PSET &DEST#="D:\Pnumber\&pnum#\P&pnum#*.jpg"
    :SET &TRANSFER# = ACTIVATE_UC_OBJECT(JOBF.MRA.TEST,,,,,PASS_VALUES,,&FILE#)
    :CLOSE_PROCESS &HNDA#
    :PRINT &FILE#
    :PRINT &pnum#

    To answer your question, it was the whole of #3.




  • 21.  Static VARA

    Posted Apr 09, 2015 12:53 PM
    Here's a quick and untested hack of all of the basic logic.  Since I am on V8 I used a PREP_PROCESS_FILENAME function instead of a Variable object.  I developed this using an existing directory and files so you will need to modify those pieces for your particular requirements and uncomment the actual functions that make the directory and activate the transfer.

    All the usual guarantees apply.
    :SET &src_host = "your_host"
    :SET &src_login = "your_login"
    :SET &src_dir = "d:\test\P*"
    :SET &src_path = "d:\test\P"
    :SET &dst_host = "your_host"
    :SET &dst_login = "your_login"
    :SET &dst_path = "d:\Pnumber\"
    :SET &hold = ""
    :SET &fid = PREP_PROCESS_FILENAME(&src_host,&src_dir)
    :PROCESS &fid 
    : SET &file = GET_PROCESS_LINE(&fid)
    : PRINT ".. &file"
    : SET &pnum = SUBSTR(&file,14,2) 
    : IF &hold EQ ""
    !  First time  
    :  SET &hold = &pnum
    :  ENDIF 
    : IF &pnum NE &hold
    :  PRINT "Make directory for &hold & Activate"
    !  Use an INC so repeat of logic not needed for last transfer.
    !:  SET &pid = PREP_PROCESS(&dst_host,"WINCMD","*","mkdir\Pnumber\&hold","UC_LOGIN=&dst_login")
    :  PRINT 'PREP_PROCESS(&dst_host,"WINCMD","*","mkdir\Pnumber\&hold","UC_LOGIN=&dst_login")'
    !  Logic to check result of above command as required.
    :  PSET &ft_src_file = "&src_pathP&hold*"
    :  PSET &ft_dst_file = "&dst_pathP&hold*"
    !:  SET &rc = ACTIVATE_UC_OBJECT(THE_FILE_TRANSFER,WAIT,,,,PASS_VALUES)
    :  PRINT 'ACTIVATE_UC_OBJECT(THE_FILE_TRANSFER,WAIT,,,,PASS_VALUES)'
    !  Logic to check result of above command as required.
    :  SET &hold = &pnum !  End of INC
    :  ENDIF 
    : ENDPROCESS 
    ! Activate last file transfer
    :IF &hold NE ""
    : PRINT "Make directory for &hold & Activate"
    !  Use an INC so repeat of logic not needed.
    :ELSE
    : PRINT "No matching files found for &src_path."
    : ENDIF
    !
    :STOP MSG,55,"Testing"




  • 22.  Static VARA

    Posted Apr 09, 2015 03:09 PM

    Thanks Mark. :) I was waaaaay off with my script.

    I took your script and modified it to fit my requirements, but I get this error msg4/9/2015 3:01:09 PM -  U0010000 Client '5555', Object 'EVENT.D:\MRATEST\' was not found. Please enter the correct name.

    I am not sure what I am doing wrong. I put the path but it doesn't like it. Here's the final product. I tried to put the path every way I know how, but it doesn't work. Could you please look at it and tell me what I am missing. *two sets of eyes are better than one*

    Thank you so much for your help and patience!

    :SET &src_host# = "WINDEVAGT1.WIN"
    :SET &src_login# = "LOGIN.UC4.WIN"
    :SET &src_dir# = "d:\MRAtest\"
    :SET &src_path# = "d:\MRAtest\*"
    :SET &dst_host# = "WINDEVAGT2.WIN"
    :SET &dst_login# = "LOGIN.UC4.WIN"
    :SET &dst_path# = "d:\Pnumber\"
    :SET &hold# = ""
    :SET &fid# = PREP_PROCESS(&src_host#,&src_dir#,"UC_LOGIN=&src_login#")
    :PROCESS &fid#
    : SET &file# = GET_PROCESS_LINE(&fid#)
    : PRINT ".. &file#"
    : SET &pnum# = SUBSTR(&file#,14,2)
    : IF &hold# EQ ""
    !  First time 
    :  SET &hold# = &pnum#
    :  ENDIF
    : IF &pnum# NE &hold#
    :  PRINT "Make directory for &hold# & Activate"
    !  Use an INC so repeat of logic not needed for last transfer.
    :  SET &pid# = PREP_PROCESS(&dst_host#,"WINCMD","*","mkdir\Pnumber\&hold#","UC_LOGIN=&dst_login#")
    :  PRINT 'PREP_PROCESS(&dst_host#,"WINCMD","*","mkdir\Pnumber\&hold#","UC_LOGIN=&dst_login#")'
    !  Logic to check result of above command as required.
    :  PSET &ft_src_file# = "&src_path#P&hold#*"
    :  PSET &ft_dst_file# = "&dst_path#P&hold#*"
    :  SET &rc = ACTIVATE_UC_OBJECT(JOBF.MRA.TEST,WAIT,,,,PASS_VALUES)
    :  PRINT 'ACTIVATE_UC_OBJECT(JOBF.MRA.TEST,WAIT,,,,PASS_VALUES)'
    !  Logic to check result of above command as required.
    :  SET &hold# = &pnum#
    !  End of INC
    :  ENDIF
    : ENDPROCESS
    ! Activate last file transfer
    :IF &hold# NE ""
    : PRINT "Make directory for &hold# & Activate"
    !  Use an INC so repeat of logic not needed.
    :ELSE
    : PRINT "No matching files found for &src_path#"
    : ENDIF
    !
    :STOP MSG,55,"Testing"



  • 23.  Static VARA

    Posted Apr 09, 2015 03:37 PM
    I'm assuming that the U0010000 message was issued for the changed line from:
    :SET &fid = PREP_PROCESS_FILENAME(&src_host,&src_dir)
    to this:
    :SET &fid# = PREP_PROCESS(&src_host#,&src_dir#,"UC_LOGIN=&src_login#")
    The PREP_PROCESS_FILENAME and  PREP_PROCESS functions are not the same and your change is not syntactically or (to my mind) logically correct.  Perhaps reading and understanding all of the documentation for a script function/statement that you use would be in order.

    Also it would be a bit easier if you entered the code samples as "code", that available in the Format pull-down, about the 6th icon from the left with the down-arrow. 


  • 24.  Static VARA

    Posted Apr 10, 2015 12:13 PM

    I changed it back to  :SET &fid =PREP_PROCESS_FILENAME(&src_host,&src_dir)  and I got this error message

    U0020240 Runtime error in object 'SCRI.MRA_MOVE', line '00033': PREP_PROCESS_FILENAME without login is not permitted, as ANONYMOUS_FT=NO.

    PS: My "code" doesn't work, only the quote and spoiler work (unless am doing it wrong)

    So I changed it to :SET &fid# = PREP_PROCESS_FILENAME(&src_host#,&src_dir#,"UC_LOGIN=&src_login#") and I get this error message

    U0020514 Runtime error in object 'SCRI.MRA_MOVE' line '00033': 'Wildcard' parameter can only be set to 'Y' or 'N' (yes/no). 'UC_LOGIN=LOGIN.UC4.WIN' is not valid.

     



  • 25.  Static VARA

    Posted Apr 10, 2015 12:27 PM
    Testing to see if the "code" works for me in Firefox
    :SET &src_host# = "WINDEVAGT1.WIN"
    :SET &src_login# = "LOGIN.UC4.WIN"
    :SET &src_dir# = "d:\MRAtest\"
    :SET &src_path# = "d:\MRAtest\*"
    :SET &dst_host# = "WINDEVAGT2.WIN"
    :SET &dst_login# = "LOGIN.UC4.WIN"
    :SET &dst_path# = "d:\Pnumber\"
    :SET &hold# = ""
    :SET &fid# = PREP_PROCESS_FILENAME(&src_host#,&src_dir#,"UC_LOGIN=&src_login#")
    :PROCESS &fid#
    : SET &file# = GET_PROCESS_LINE(&fid#)
    : PRINT ".. &file#"
    : SET &pnum# = SUBSTR(&file#,14,2)
    : IF &hold# EQ ""
    !  First time
    :  SET &hold# = &pnum#
    :  ENDIF
    : IF &pnum# NE &hold#
    :  PRINT "Make directory for &hold# & Activate"
    !  Use an INC so repeat of logic not needed for last transfer.
    :  SET &pid# = PREP_PROCESS(&dst_host#,"WINCMD","*","mkdir\Pnumber\&hold#",,"UC_LOGIN=&dst_login#")
    :  PRINT 'PREP_PROCESS(&dst_host#,"WINCMD","*","mkdir\Pnumber\&hold#","UC_LOGIN=&dst_login#")'
    !  Logic to check result of above command as required.
    :  PSET &ft_src_file# = "&src_path#P&hold#*"
    :  PSET &ft_dst_file# = "&dst_path#P&hold#*"
    :  SET &rc = ACTIVATE_UC_OBJECT(JOBF.MRA.TEST,WAIT,,,,PASS_VALUES)
    :  PRINT 'ACTIVATE_UC_OBJECT(JOBF.MRA.TEST,WAIT,,,,PASS_VALUES)'
    !  Logic to check result of above command as required.
    :  SET &hold# = &pnum#
    !  End of INC
    :  ENDIF
    : ENDPROCESS
    ! Activate last file transfer
    :IF &hold# NE ""
    : PRINT "Make directory for &hold# & Activate"
    !  Use an INC so repeat of logic not needed.
    :ELSE
    : PRINT "No matching files found for &src_path#"
    : ENDIF





  • 26.  Static VARA

    Posted Apr 10, 2015 12:31 PM
    Please review the required syntax for the PREP_PROCESS_FILENAME function.  Your environment's requirements are different from mine so you appear to need to specify a Login object name to list the directory.  You could remove that and use your original Variable object, but since I have no experience with that I cannot advise you on the specifics. 

    Do you have any programming experience and, if so, what language(s)?  This will assist me in knowing how to best respond to future issues.


  • 27.  Static VARA

    Posted Apr 10, 2015 03:54 PM

    I reviewed the required syntax for PREP_PROCESS_FILENAME and I added what I was missing.

    My programming experience is very basic. I have a little bit of SQL experience but I don't use it a lot, if at all.

    This is what I have so far,

    :SET &src_host# = "WINDEVAGT1.WIN"
    :SET &src_login# = "LOGIN.UC4.WIN"
    :SET &src_dir# = "d:\MRAtest\P*"
    :SET &src_path# = "d:\MRAtest\P"
    :SET &dst_host# = "WINDEVAGT2.WIN"
    :SET &dst_login# = "LOGIN.UC4.WIN"
    :SET &dst_path# = "d:\Pnumber\"
    :SET &hold# = ""
    :SET &fid# = PREP_PROCESS_FILENAME(&src_host#,&src_dir#,"Y",,,,"UC_LOGIN=&src_login#")
    :PROCESS &fid#
    : SET &file# = GET_PROCESS_LINE(&fid#)
    : PRINT ".. &file#"
    : define &pnum#, string
    : SET &pnum# = SUBSTR("&file#",14,2)
    !: SET &pnum# = MID("&file#", 2,4)
    : IF &hold# EQ ""
    !  First time
    :  SET &hold# = &pnum#
    :  ENDIF
    : IF &pnum# NE &hold#
    :  PRINT "Make directory for &hold# & Activate"
    !  Use an INC so repeat of logic not needed for last transfer.
    :  SET &pid# = PREP_PROCESS(&dst_host#,"WINCMD","*","CMD=if not exist &hold# mkdir\Pnumber\&hold#",,,,"UC_LOGIN=&dst_login#")
    :  CLOSE_PROCESS &pid#
    :  PRINT 'PREP_PROCESS(&dst_host#,"WINCMD","*","mkdir\Pnumber\&hold#","UC_LOGIN=&dst_login#")'
    !  Logic to check result of above command as required
    :  PSET &ft_src_file# = "&src_path#P&hold#*"
    :  PSET &ft_dst_file# = "&dst_path#P&hold#*"
    :  SET &rc = ACTIVATE_UC_OBJECT(JOBF.MRA.TEST,WAIT,,,,PASS_VALUES)
    :  PRINT 'ACTIVATE_UC_OBJECT(JOBF.MRA.TEST,WAIT,,,,PASS_VALUES)'
    !  Logic to check result of above command as required.
    :  SET &hold# = &pnum#
    !  End of INC
    :  ENDIF
    : ENDPROCESS
    ! Activate last file transfer
    :IF &hold# NE ""
    : PRINT "Make directory for &hold# & Activate"
    !  Use an INC so repeat of logic not needed.
    :ELSE
    : PRINT "No matching files found for &src_path#"
    : ENDIF
    :STOP MSG,55,"Testing"

    and these are the results

    2015-04-10 15:51:44 - U0020408 .. d:\MRAtest\p0297053.jpg
    2015-04-10 15:51:44 - U0020408 .. d:\MRAtest\p0297054.jpg
    2015-04-10 15:51:44 - U0020408 .. d:\MRAtest\p0314002.jpg
    2015-04-10 15:51:44 - U0020408 Make directory for 29 & Activate
    2015-04-10 15:51:44 - U0007000 'EVENT.WINCMD' activated with RunID '0003331983'.
    2015-04-10 15:51:44 - U0020408 PREP_PROCESS(WINDEVAGT2.WIN,"WINCMD","*","mkdir\Pnumber\29","UC_LOGIN=LOGIN.UC4.WIN")
    2015-04-10 15:51:44 - U0020237 The object variable '&FT_SRC_FILE#' in object: 'SCRI.MRA_MOVE', line: '00051' (RunID: '0003331982') has been created with the value 'd:\MRAtest\PP29*' by  using the command :PSET.
    2015-04-10 15:51:44 - U0020239 Runtime warning in object 'SCRI.MRA_MOVE', line '00051': Could not find parent task of type JOBP or JSCH.
    2015-04-10 15:51:44 - U0020206 Variable 'ft_src_file#' was stored with value 'd:\MRAtest\PP29*'.
    2015-04-10 15:51:44 - U0020237 The object variable '&FT_DST_FILE#' in object: 'SCRI.MRA_MOVE', line: '00052' (RunID: '0003331982') has been created with the value 'd:\Pnumber\P29*' by  using the command :PSET.
    2015-04-10 15:51:44 - U0020239 Runtime warning in object 'SCRI.MRA_MOVE', line '00052': Could not find parent task of type JOBP or JSCH.
    2015-04-10 15:51:44 - U0020206 Variable 'ft_dst_file#' was stored with value 'd:\Pnumber\P29*'.
    2015-04-10 15:51:44 - U0007000 'JOBF.MRA.TEST' activated with RunID '0003331984'.
    2015-04-10 15:51:45 - U0020408 ACTIVATE_UC_OBJECT(JOBF.MRA.TEST,WAIT,,,,PASS_VALUES)
    2015-04-10 15:51:45 - U0020408 .. d:\MRAtest\p0314003.jpg
    2015-04-10 15:51:45 - U0020408 .. d:\MRAtest\p0314004.jpg
    2015-04-10 15:51:45 - U0020408 .. d:\MRAtest\p0326029.jpg
    2015-04-10 15:51:45 - U0020408 Make directory for 31 & Activate
    2015-04-10 15:51:45 - U0007000 'EVENT.WINCMD' activated with RunID '0003330535'.
    2015-04-10 15:51:45 - U0020408 PREP_PROCESS(WINDEVAGT2.WIN,"WINCMD","*","mkdir\Pnumber\31","UC_LOGIN=LOGIN.UC4.WIN")
    2015-04-10 15:51:45 - U0020230 Value '&FT_SRC_FILE#' in object: 'SCRI.MRA_MOVE', line: '00051' (RunID: '0003331982') was changed from 'd:\MRAtest\PP29*' to 'd:\MRAtest\PP31*' using the command :PSET.
    2015-04-10 15:51:45 - U0020239 Runtime warning in object 'SCRI.MRA_MOVE', line '00051': Could not find parent task of type JOBP or JSCH.
    2015-04-10 15:51:45 - U0020206 Variable 'ft_src_file#' was stored with value 'd:\MRAtest\PP31*'.
    2015-04-10 15:51:45 - U0020230 Value '&FT_DST_FILE#' in object: 'SCRI.MRA_MOVE', line: '00052' (RunID: '0003331982') was changed from 'd:\Pnumber\P29*' to 'd:\Pnumber\P31*' using the command :PSET.
    2015-04-10 15:51:45 - U0020239 Runtime warning in object 'SCRI.MRA_MOVE', line '00052': Could not find parent task of type JOBP or JSCH.
    2015-04-10 15:51:45 - U0020206 Variable 'ft_dst_file#' was stored with value 'd:\Pnumber\P31*'.
    2015-04-10 15:51:45 - U0007000 'JOBF.MRA.TEST' activated with RunID '0003331985'.
    2015-04-10 15:51:46 - U0020408 ACTIVATE_UC_OBJECT(JOBF.MRA.TEST,WAIT,,,,PASS_VALUES)
    2015-04-10 15:51:46 - U0020408 .. d:\MRAtest\p1745000.jpg
    2015-04-10 15:51:46 - U0020408 Make directory for 32 & Activate
    2015-04-10 15:51:46 - U0007000 'EVENT.WINCMD' activated with RunID '0003330537'.
    2015-04-10 15:51:47 - U0020408 PREP_PROCESS(WINDEVAGT2.WIN,"WINCMD","*","mkdir\Pnumber\32","UC_LOGIN=LOGIN.UC4.WIN")
    2015-04-10 15:51:47 - U0020230 Value '&FT_SRC_FILE#' in object: 'SCRI.MRA_MOVE', line: '00051' (RunID: '0003331982') was changed from 'd:\MRAtest\PP31*' to 'd:\MRAtest\PP32*' using the command :PSET.
    2015-04-10 15:51:47 - U0020239 Runtime warning in object 'SCRI.MRA_MOVE', line '00051': Could not find parent task of type JOBP or JSCH.
    2015-04-10 15:51:47 - U0020206 Variable 'ft_src_file#' was stored with value 'd:\MRAtest\PP32*'.
    2015-04-10 15:51:47 - U0020230 Value '&FT_DST_FILE#' in object: 'SCRI.MRA_MOVE', line: '00052' (RunID: '0003331982') was changed from 'd:\Pnumber\P31*' to 'd:\Pnumber\P32*' using the command :PSET.
    2015-04-10 15:51:47 - U0020239 Runtime warning in object 'SCRI.MRA_MOVE', line '00052': Could not find parent task of type JOBP or JSCH.
    2015-04-10 15:51:47 - U0020206 Variable 'ft_dst_file#' was stored with value 'd:\Pnumber\P32*'.
    2015-04-10 15:51:47 - U0007000 'JOBF.MRA.TEST' activated with RunID '0003331986'.
    2015-04-10 15:51:47 - U0020408 ACTIVATE_UC_OBJECT(JOBF.MRA.TEST,WAIT,,,,PASS_VALUES)
    2015-04-10 15:51:47 - U0020408 .. d:\MRAtest\p1776071.jpg
    2015-04-10 15:51:47 - U0020408 Make directory for 74 & Activate
    2015-04-10 15:51:47 - U0007000 'EVENT.WINCMD' activated with RunID '0003330539'.
    2015-04-10 15:51:48 - U0020408 PREP_PROCESS(WINDEVAGT2.WIN,"WINCMD","*","mkdir\Pnumber\74","UC_LOGIN=LOGIN.UC4.WIN")
    2015-04-10 15:51:48 - U0020230 Value '&FT_SRC_FILE#' in object: 'SCRI.MRA_MOVE', line: '00051' (RunID: '0003331982') was changed from 'd:\MRAtest\PP32*' to 'd:\MRAtest\PP74*' using the command :PSET.
    2015-04-10 15:51:48 - U0020239 Runtime warning in object 'SCRI.MRA_MOVE', line '00051': Could not find parent task of type JOBP or JSCH.
    2015-04-10 15:51:48 - U0020206 Variable 'ft_src_file#' was stored with value 'd:\MRAtest\PP74*'.
    2015-04-10 15:51:48 - U0020230 Value '&FT_DST_FILE#' in object: 'SCRI.MRA_MOVE', line: '00052' (RunID: '0003331982') was changed from 'd:\Pnumber\P32*' to 'd:\Pnumber\P74*' using the command :PSET.
    2015-04-10 15:51:48 - U0020239 Runtime warning in object 'SCRI.MRA_MOVE', line '00052': Could not find parent task of type JOBP or JSCH.
    2015-04-10 15:51:48 - U0020206 Variable 'ft_dst_file#' was stored with value 'd:\Pnumber\P74*'.
    2015-04-10 15:51:48 - U0007000 'JOBF.MRA.TEST' activated with RunID '0003331987'.
    2015-04-10 15:51:48 - U0020408 ACTIVATE_UC_OBJECT(JOBF.MRA.TEST,WAIT,,,,PASS_VALUES)
    2015-04-10 15:51:48 - U0020408 .. d:\MRAtest\p1776079.jpg
    2015-04-10 15:51:48 - U0020408 Make directory for 77 & Activate
    2015-04-10 15:51:48 - U0020411 The command 'STOP' in 'SCRI.MRA_MOVE', line '00067' stopped the generation of this task.

    There are no new directories created on the destination server, but the files transfer ok.



  • 28.  Static VARA

    Posted Apr 10, 2015 04:40 PM
    I think that I'm going to bow out now.  You appear to have enough of the basic process logic and it should just require a bit more "tweaking".  I would recommend that you find others in your organization with the appropriate skills to assist you in this endeavor.

    Here is what I will leave you with:

    Shouldn't the following statement have a start and length value of 13,4 instead of 14,2?
    : SET &pnum# = SUBSTR("&file#",14,2)
    It appears that the Windows MKDIR command is not properly formatted.  Did you look at the Report from one of the PREP_PROCESS tasks?  Those are indicated in the activation protocol as the following or you can view the Script's Child-task statistics to locate them.
     U0007000 'EVENT.WINCMD'activated with RunID '0003331983'
    I'd also ensure that the DST/SRC file names and wildcards match your expectations for the file transfers.  These are indicated in the protocol as:
    U0020237 The object Variable '&FT_SRC_FILE#' in object: 'SCRI.MRA_MOVE', line: '00051' (RunID:'0003331982') has been created with the value 'd:\MRAtest\PP29*' by using the command :PSET
    Also, look at the Report and Details for the executions of the JOBF.MRA.TEST File Transfer objects to ensure that what you are passing is properly being received and that the PUT_ATT function is setting the desired attributes.

    Don't forget to  make the indicated Include object for the MKDIR and activation so that final set of files are actually transported.  As it is now, they do not.

    Good luck.