View previous topic :: View next topic
|
Author |
Message |
tejdeep0274
New User
Joined: 28 Jan 2015 Posts: 10 Location: India
|
|
|
|
My requirement is transmit a file to destination via connect direct and append date.
Here is the description
I am sending a file from mainframes to windows( say sever1)
consider destination path to be E:\Test
DSN=E:\TEST\test1.txt is not valid (tested) hence gave DSN='E:\TEST\test1.txt' ---- working fine with single quotes
but the issue is i need to send and concatenate it with current date expected output is test1_150219
if &DSN=E:\TEST\test1_
In process DSN= &DSN || &DATE || .txt will resolve to
DSN=E:TEST\test1_20150219 but due to absense of single quote . path is not recogined and if i gave single quote
file transmit as test1_&date -- symbolic parameter is not resolved in single quote . |
|
Back to top |
|
|
Smita.t2
New User
Joined: 17 Apr 2012 Posts: 31 Location: Bangalore
|
|
|
|
Please try intrinsic variable in CD in process statement.
&D=%SUBDATE1
and in the DSN field.
&DSN || &D || .txt. |
|
Back to top |
|
|
tejdeep0274
New User
Joined: 28 Jan 2015 Posts: 10 Location: India
|
|
|
|
Hi smita,
i tried this way
&dsn = E:\TEST\test1_
&date = %sysdate1
dsn =&dsn || &date || .txt
will resolve to dsn=E:\TEST\test1_150219.txt
but the path is not in single quote so job filing as path is invalid.
tested below path and it worked fine
dsn = 'E:\TEST\test1_&date.txt' in single quote
is there a way i can resolve symbolic parameter and get a path similar to above. |
|
Back to top |
|
|
tejdeep0274
New User
Joined: 28 Jan 2015 Posts: 10 Location: India
|
|
|
|
Hi ,
Below code worked
SIGNON ESF=NO -
CASE=YES
COPYDF SUBMIT PROC=XYZ -
MAXDELAY=UNLIMITED -
SNODE=ABCDEF -
&DATE=%SUBDATE3 -
&DSN1=XXX.YYYY.ZZZZZZ(0) -
&DSNS=\'\ || \D:\\CDTEST\\SOURCE\\TEST\ || \'\ -
&DSN2=&DSNS..&DATE..TXT -
&DISP1=SHR -
&DISP2=RPL
SIGNOFF
it created the file as 'TEST_.05082015'
After under score a dote is coming using the above code. please let me know a way to get rid of it.
Thanks |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
How does the underscore get into your name? There is no underscore in the code in your last post. Maybe it is masked by the fact that you have not used the code tags to present your code.
Why not study your code and try and work out what is happening? Try tweaking it and running it until you understand how each bit works?
My guess is that you need to remove one of the dots in one of the places where your double dots are. |
|
Back to top |
|
|
tejdeep0274
New User
Joined: 28 Jan 2015 Posts: 10 Location: India
|
|
|
|
Sorry my requirement is with _ so in &DSNS after TEST i placed underscore and it came
As a trail and error logic i tested the dots in all possible ways . nothing worked |
|
Back to top |
|
|
|