IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

NDM: Splitting Dataset name of large length in to 2 lines


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Wed Nov 28, 2007 12:02 am
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed Nov 28, 2007 1:44 am
Reply with quote

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
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Wed Nov 28, 2007 10:37 am
Reply with quote

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
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Wed Nov 28, 2007 4:00 pm
Reply with quote

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
View user's profile Send private message
swapnadeep.ganguly

Active User


Joined: 21 Mar 2007
Posts: 203
Location: India

PostPosted: Wed Jan 30, 2008 2:55 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Wed Jan 30, 2008 9:20 pm
Reply with quote

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
View user's profile Send private message
swapnadeep.ganguly

Active User


Joined: 21 Mar 2007
Posts: 203
Location: India

PostPosted: Thu Jan 31, 2008 11:25 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Thu Jan 31, 2008 9:16 pm
Reply with quote

Cool - thanks for letting us know icon_smile.gif

d
Back to top
View user's profile Send private message
Steve Elliott

New User


Joined: 13 Feb 2008
Posts: 2
Location: Melbourne Australia

PostPosted: Fri Feb 15, 2008 10:58 am
Reply with quote

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. icon_biggrin.gif
Back to top
View user's profile Send private message
swapnadeep.ganguly

Active User


Joined: 21 Mar 2007
Posts: 203
Location: India

PostPosted: Fri Feb 15, 2008 12:33 pm
Reply with quote

Hi Steve,

It was very kind of you to post your solution. Kudos to you.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Sat Feb 16, 2008 12:53 am
Reply with quote

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 icon_smile.gif

Hopefully, we will have some "stuff" here that will be useful to you as well.

d
Back to top
View user's profile Send private message
pravena

New User


Joined: 31 Jan 2007
Posts: 9
Location: chennai

PostPosted: Mon Feb 18, 2008 12:00 pm
Reply with quote

Hi Steve,
Thanks for ur superb explanation.
it's very useful icon_smile.gif
Back to top
View user's profile Send private message
KARTHIGADEVI

New User


Joined: 07 Sep 2017
Posts: 4
Location: Singapore

PostPosted: Tue Dec 05, 2017 5:26 pm
Reply with quote

This can also do..


&OUT01=\'/datastage/data/XXXX_XXXX_XXX/Loss/src/\|| -
\XXXXXXXX.XXXXXXXX.XXXX.REINGRP.DAT'\ -
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8700
Location: Dubuque, Iowa, USA

PostPosted: Tue Dec 05, 2017 6:24 pm
Reply with quote

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
View user's profile Send private message
sapfisher

New User


Joined: 17 Aug 2017
Posts: 3
Location: usa

PostPosted: Sat Mar 17, 2018 1:31 am
Reply with quote

Robert Sample,
Actually, I was googling this topic and found the old messages and it WAS very helpful.

Thanks!
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2454
Location: Hampshire, UK

PostPosted: Sat Mar 17, 2018 2:39 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts batch SFTP job using AOPBATCH unable ... All Other Mainframe Topics 7
No new posts Mark Previous & next lines when a... DFSORT/ICETOOL 9
No new posts Get RECORD LENGTH, allocated space of... CLIST & REXX 7
No new posts Reading Empty Dataset DFSORT/ICETOOL 5
No new posts Mainframe Dataset Binary or ASCII Mainframe Interview Questions 4
Search our Forums:

Back to Top