Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
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    Post subject: NDM: Splitting Dataset name of large length in to 2 lines
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

Moderator Team Head


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

PostPosted: Wed Nov 28, 2007 1:44 am    Post subject: Reply to: NDM: Splitting Dataset name of large length in to
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    Post subject:
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    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Wed Jan 30, 2008 9:20 pm    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Thu Jan 31, 2008 9:16 pm    Post subject: Reply to: NDM: Splitting Dataset name of large length in to
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    Post subject: Reply to: NDM: Splitting Dataset name of large length in to
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    Post subject:
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

Site Director


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

PostPosted: Sat Feb 16, 2008 12:53 am    Post subject: Reply to: NDM: Splitting Dataset name of large length in to
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    Post subject:
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Browse dataset cvnlynn CLIST & REXX 4 Tue Jul 18, 2017 3:52 am
No new posts XML Parse for large file muralikrishnan_new COBOL Programming 3 Mon Jun 12, 2017 12:50 pm
No new posts Fileaid 2 commands instream work. In ... descann Compuware & Other Tools 2 Tue May 16, 2017 3:31 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us