cancel
Showing results for 
Search instead for 
Did you mean: 

REL-Function for getting jobfile-location

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

gmblom
Active Contributor
0 Kudos

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

nanda_kumar21
Active Contributor
0 Kudos

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

thanks

Nanda