Skip to Content
author's profile photo Former Member
Former Member

REL-Function for getting jobfile-location

Hello,

I have a chain with two steps. First step is the job "System_ArchiveAuditObjects" which creates a file "archive.xml". In the second step I want to transfer this jobfile to another unix-server.

I tried it in this way:

Bash-Job with source:

chmod o+r-- ${p_source}

cp ${p_source} ${p_target}${p_date}"_"${p_AuditObject}".xml"

and parameters

p_JobId: =JobChainParameters.getJobId('Step1,job 1')

p_source: /default

p_target: /Zielpfad/

p_date: =Time.format(Time.expression(Time.expressionNow('trauncate month'),'subtract 1 day'),'yyyyMM')

p_AuditObject: =JobChainParameters.getInValueString('Step 1,job 1','ObjectType')

But I got the error message

chmod: cannot access `/usr/sap/X0P/J09/j2ee/cluster/server0/scheduler/lis/558560000-558569999/558560930/System_558560930_1001005.xml': No such file or directory

cp: cannot stat `/usr/sap/X0P/J09/j2ee/cluster/server0/scheduler/lis/558560000-558569999/558560930/System_558560930_1001005.xml': No such file or Directory

If I try p_source: /default/archive.xml the error message is the same one (also with filename System_xxx_xxx.xml).

How can I get this file?

Best regards

Dana

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Jan 14, 2016 at 11:39 PM

    Where are you using p_JobId parameter in your script?

    p_source is a directory as per your parameter values and you are trying rename the directory to /Zielpfad/ddmmyy_System.xml?

    Can you try this solution by @G. Blom

    thanks

    Nanda

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 15, 2016 at 08:18 AM

    Hello Dana,

    You cannot just start copying files on a different server expecting them to be there. You have to get them first. Indeed, the easiest way to do that is using the jgetfile option Nanda refers to.

    Regards Gerben

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.