View previous topic :: View next topic
|
Author |
Message |
krisprems
Active Member
Joined: 27 Nov 2006 Posts: 649 Location: India
|
|
|
|
Hi
I have a NDM Connect Direct step..
I need a Syntax to split the File name(Wich is greater than 72 bytes) in to two lines,
Code: |
PROCESS HOLD=NO CLASS=1 PRTY=10 SNODE=&SNODE
COPY FROM (SNODE -
DISP=SHR -
YSOPTS=":DATATYPE=TEXT:XLATE=YES:" -
-1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
DSN='/required/now/online/setup/window/importan/refreshed'
rsafdbk.dat') -
COMPRESS EXTENDED -
TO (PNODE -
DSN='HLQ.OUTPUT.FILE' -
DISP=SHR)
|
In the above example the input file DSN= is larger so have split the name in to 2 lines...which is the wrong syntax....
Can any one suggest the right one! |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
How about breaking the string into tokens, then concatenating the tokens together?
Code: |
PNAME PROCESS HOLD=NO CLASS=1 PRTY=10 SNODE=&SNODE
*
SYMBOL &NOD1=\/required\
SYMBOL &NOD2=\/now\
SYMBOL &NOD3=\/online\
SYMBOL &NOD4=\/setup\
SYMBOL &NOD5=\/window\
SYMBOL &NOD6=\/importan\
SYMBOL &NOD7=\/refreshed\
SYMBOL &NAME=\/rsafdbk.dat\
SYMBOL &FILE=&NOD1 || &NOD2 || &NOD3 || &NOD4 || -
&NOD5 || &NOD6 || &NOD7 || &NAME
*
COPY FROM (SNODE -
DISP=SHR -
SYSOPTS=":DATATYPE=TEXT:XLATE=YES:" -
DSN=&FILE) -
COMPRESS EXTENDED -
TO (PNODE -
DSN='HLQ.OUTPUT.FILE' -
DISP=SHR)
|
|
|
Back to top |
|
|
krisprems
Active Member
Joined: 27 Nov 2006 Posts: 649 Location: India
|
|
|
|
Thank you very much, this solved most of my problem...
But what about the single quotes...that is
Code: |
DSN='/required/now/online/setup/window/importan/refreshed
rsafdbk.dat') - |
and one more thing, i have some of the DSN's in this format, how can i impplemant SYMBOL here?
Code: |
DSN='\\required\now\online\setup\window\importan\refreshed
rsafdbk.dat') - |
|
|
Back to top |
|
|
krisprems
Active Member
Joined: 27 Nov 2006 Posts: 649 Location: India
|
|
|
|
I got the soultion for splitting the file name in to two lines without using SYMBOL's.
This is the Correct SYNATX
Code: |
DSN='/required/now/online/setup/window/importan/refreshed
'rsafdbk.dat') - |
But Superk, still this problem is unresolved
Code: |
DSN='\\required\now\online\setup\window\importan\refreshed
rsafdbk.dat') - |
|
|
Back to top |
|
|
swapnadeep.ganguly
Active User
Joined: 21 Mar 2007 Posts: 203 Location: India
|
|
|
|
Hi krisprems,
I am facing the same problem as yours. But the solution that you have provided is not working for me. Can you please look into the matter??? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
But the solution that you have provided is not working for me. Can you please look into the matter??? |
For someone to help, you need to post the needed info. If you post your "code" and the diagnostic info from the system, someone may have suggestions. |
|
Back to top |
|
|
swapnadeep.ganguly
Active User
Joined: 21 Mar 2007 Posts: 203 Location: India
|
|
|
|
Hi Dick,
I was able to solve the matter.
Basically I was going wrong in one part. The code that helped me out is as under:
Code: |
&OUT01=\'/datastage/data/XXXX_XXXX_XXX/Loss/src/\|| -
\XXXXXXXX.XXXXXXXX.XXXX.REINGRP.DAT'\ -
|
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Cool - thanks for letting us know
d |
|
Back to top |
|
|
Steve Elliott
New User
Joined: 13 Feb 2008 Posts: 2 Location: Melbourne Australia
|
|
|
|
Here is the method for splitting paths with backslashes over multiple lines:
1) Double all the backslashes eg: \\\\Server\\folder1\\folder2\\file.txt
2) Split the line as many times as you need (anywhere except in the
middle of two backslashes)
eg:
\\\\Server\\fold
er1\\folder
2\\file.txt
3) Then:
add \' in front of the first line
add \ in front of all other lines
add '\ at the end of the last line
add \ || at the end of all previous lines
include the continuation character as normal.
eg:
\'\\\\Server\\fold\ || -
\er1\\folder\ || -
\2\\file.txt'\ -
This even works if you have spaces in your folder names, and even when the space is at the end or start of a line.
The same logic can also be used in the run task see example below:
RUNSTEP1 RUN TASK (PGM="WINNT") -
SYSOPTS= -
\'\\\\Server\\fold\ || -
\er1\\folder\ || -
\2\\file.bat'\ -
SNODE
It took me around 150 attempts to figure this out, so hopefully it will be of use for someone else. |
|
Back to top |
|
|
swapnadeep.ganguly
Active User
Joined: 21 Mar 2007 Posts: 203 Location: India
|
|
|
|
Hi Steve,
It was very kind of you to post your solution. Kudos to you. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello Steve and welcome to the forums,
Thank you for posting your "path split" method.
Quote: |
so hopefully it will be of use for someone else |
Yes, i'm sure it will
Hopefully, we will have some "stuff" here that will be useful to you as well.
d |
|
Back to top |
|
|
pravena
New User
Joined: 31 Jan 2007 Posts: 9 Location: chennai
|
|
|
|
Hi Steve,
Thanks for ur superb explanation.
it's very useful |
|
Back to top |
|
|
KARTHIGADEVI
New User
Joined: 07 Sep 2017 Posts: 4 Location: Singapore
|
|
|
|
This can also do..
&OUT01=\'/datastage/data/XXXX_XXXX_XXX/Loss/src/\|| -
\XXXXXXXX.XXXXXXXX.XXXX.REINGRP.DAT'\ - |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
KARTHIGADEVI, after almost NINE YEARS, I really doubt your post will have much impact. PLEASE look at the last post date before adding anything to any topic -- if the last post date was more than a few months ago, it is unlikely you can add anything of value to that topic. |
|
Back to top |
|
|
sapfisher
New User
Joined: 17 Aug 2017 Posts: 3 Location: usa
|
|
|
|
Robert Sample,
Actually, I was googling this topic and found the old messages and it WAS very helpful.
Thanks! |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
Quote: |
found the old messages and it WAS very helpful. |
Which is why old topics are left avaiable. But - more precisely, was the post of 05 Dec 17 the useful point? |
|
Back to top |
|
|
|