Append date in the File



Ask queries about other IBM Tools like Tivoli, COBTEST, Fault Analyzer, z/OS File Manager, Workload Simulator, APA, SCLM, Merge & Migration Tools etc...

Append date in the File

Postby trilochan_p » Thu Feb 16, 2012 5:28 pm

Hi,

I have below piece of code in the NDM step and i wanted to append date in the send file (NONEIS-MMDDYYYY).
Please suggest the code changes to add date in the To file.

NDMAPGXK PROCESS SNODE=LIBCDS01.LIB PNODE=CIGNAT                       
STEP1 COPY FROM (PNODE DSN=CEA4.APR00.RCPDSD09.OFAC(0)         -       
               DISP=SHR)                                             -
           COMPRESS EXT                                              -
 TO  (SNODE DSN='\\USLIBFS302\LIBFS44K\OFAC\NONEIS.TXT'              -
           SYSOPTS="STRIP.BLANKS(NO)"                                -
               DISP=RPL) 


Thanks & Regards,
Tilu
trilochan_p
 
Posts: 15
Joined: Tue Dec 06, 2011 2:37 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Append date in the File

 

Re: Append date in the File

Postby MrSpock » Thu Feb 16, 2012 8:15 pm

The Symbolic Variable %SUBDATE3 can be used for a mmddyyyy current submitted-date format. You'll have to build a variable string in your process.

NDMAPGXK PROCESS SNODE=LIBCDS01.LIB PNODE=CIGNAT -   
                     DATE=%SUBDATE3     
                     SYMBOL &FILE='\\USLIBFS302\LIBFS44K\OFAC\NONEIS-'.&DATE
STEP1 COPY FROM (PNODE DSN=CEA4.APR00.RCPDSD09.OFAC(0)         -       
               DISP=SHR)                                             -
           COMPRESS EXT                                              -
TO  (SNODE DSN=&FILE -
           SYSOPTS="STRIP.BLANKS(NO)"                                -
               DISP=RPL) 


for example. You're going to have to work out the logisitics of keeping those imbedded single-quotes that you need for the target filename.
User avatar
MrSpock
Global moderator
 
Posts: 810
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 2 times

Re: Append date in the File

Postby trilochan_p » Fri Feb 17, 2012 5:42 am

Thanks for your suggestions.

In the mentioned code .txt is missing, If i include .txt then is the code will b as mentioned below:

SYMBOL &FILE='\\USLIBFS302\LIBFS44K\OFAC\NONEIS-'.&DATE.'TXT' -

Instead of decalring sysmbolic variable, can i include below code in the process step it sel, Is it fine.
TO (SNODE DSN='\\USLIBFS302\LIBFS44K\OFAC\NONEIS-'.&DATE.'.TXT' -
trilochan_p
 
Posts: 15
Joined: Tue Dec 06, 2011 2:37 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Append date in the File

Postby NicC » Fri Feb 17, 2012 12:19 pm

What happened when you tried?
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times

Re: Append date in the File

Postby trilochan_p » Wed Feb 22, 2012 4:49 pm

Hi,

I have tried with this code (SNODE DSN='\\USLIBFS302\LIBFS44K\OFAC\NONEIS-'.&DATE..TXT) and
have got this output (\\USLIBFS302\LIBFS44K\OFAC\NONEIS-.02222012.TXT)

Here i am getting dot symbol while adding date in the file name, i have tried so many options to remove this dot sysmbol but not able got success.

Please suggest the code changes to remove this dot symbol in between the file name and date.
trilochan_p
 
Posts: 15
Joined: Tue Dec 06, 2011 2:37 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Append date in the File

Postby trilochan_p » Wed Feb 22, 2012 4:49 pm

Hi,

I have tried with this code (SNODE DSN='\\USLIBFS302\LIBFS44K\OFAC\NONEIS-'.&DATE..TXT) and
have got this output (\\USLIBFS302\LIBFS44K\OFAC\NONEIS-.02222012.TXT)

Here i am getting dot symbol while adding date in the file name, i have tried so many options to remove this dot sysmbol but not able got success.

Please suggest the code changes to remove this dot symbol in between the file name and date.
trilochan_p
 
Posts: 15
Joined: Tue Dec 06, 2011 2:37 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Append date in the File

Postby dick scherrer » Sun Feb 26, 2012 8:50 am

Hello,

I have no way to test this, but what happens if you remove the "dot" between the quote and &date?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times


Return to Other IBM Tools

 


  • Related topics
    Replies
    Views
    Last post