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

Connect Direct with Date and Time Stamp


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

New User


Joined: 06 Jun 2007
Posts: 83
Location: anada

PostPosted: Wed Jun 27, 2012 7:52 pm
Reply with quote

I have used search button to check the related links, and build the code, however i am facing the below issue.

Mainframes --> Linux server.

This is the NDM Process:

Code:
NARARTAS   PROCESS SNODE=NDMTESTSERV PNODE=MNFRM                       -
              &OUTDSN='/apps/mule/naritas/NARA/input/NARA'           -
               MAXDELAY                                                 
STEP1      COPY    FROM (PNODE                                         -
                   DSN=&DSNIN                                          -
                   DISP=SHR)                                           -
                   TO (SNODE                                           -
                      DSN=&OUTDSN || _D || &DATE || T || &TIME || .TXT -
                      DISP=NEW                                         -
                      SYSOPTS="DATATYPE(TEXT) STRIP.BLANKS(NO)")   


This is my DMBATCH control card:

Code:
 SIGNON CASE=YES                                           
 SUBMIT PROC=NARARTAS -                                     
        &DSNIN=VF1209.DBKPB.N.CLIENT.G9112V00(+1)  -       
        &DATE=%SUBDATE1                            -       
        &TIME=%SUBTIME       


This is output error message:

SHORT TEXT => SCBC085I Invalid keyword in TO parameter list of a COPY command.
UIERRM1 => STEP1 COPY TO(_D201206
LONG TEXT => An unsupported or misspelled keyword was found within the
'TO' parameter list of a COPY command.

EXAMPLE:
COPY FROM (DSN=MY.SRC) COMPRESS PRIME=X'40' -
TO (DSN=dsn DCB=(....) UNIT=unit VOL=SER=volser)



SYSTEM ACTION: Return to invoker with RC=8.


Where can i get more information on this error? It looks like NDM is not able to parse date and time stamp and append it to the file. This is the first NDM script i am building on mainframes.

Any help is appreciated.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Wed Jun 27, 2012 8:09 pm
Reply with quote

Hello,

Suggest you try to find some other NDM process that successfully does this on your system. Then apply the same code to your process.

I don't "do" NDM, so i don't know specifics.
Back to top
View user's profile Send private message
nartcr

New User


Joined: 06 Jun 2007
Posts: 83
Location: anada

PostPosted: Wed Jun 27, 2012 8:21 pm
Reply with quote

When i take the date and time parm out from the above equation, it works like a charm.

If i am modifying the script to

Code:
000001 NARARTAS PROCESS SNODE=NDMTESTSERV PNODE=MNFRM -
000002 &OUTDSN='/apps/mule/naritas/NARA/input/NARA.txt -
000003 MAXDELAY
000004 STEP1 COPY FROM (PNODE -
000005 DSN=&DSNIN -
000006 DISP=SHR) -
000007 TO (SNODE -
000008 DSN=&OUTDSN -
000009 DISP=NEW -
000010 SYSOPTS="DATATYPE(TEXT) STRIP.BLANKS(NO)")

But i am trying to add date and time stamp to my outbound file, to make it unique. Any suggestions?
Back to top
View user's profile Send private message
nartcr

New User


Joined: 06 Jun 2007
Posts: 83
Location: anada

PostPosted: Wed Jun 27, 2012 8:23 pm
Reply with quote

And the job is using Connect: Direct to transmit files to linux server.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Wed Jun 27, 2012 8:40 pm
Reply with quote

Hello,

You could include a "pre-NDM" step that would dynamically build the NDM control statements that would include the date/time you want. Then use these generated copntrol statements in the NDM execution.
Back to top
View user's profile Send private message
nartcr

New User


Joined: 06 Jun 2007
Posts: 83
Location: anada

PostPosted: Wed Jun 27, 2012 9:04 pm
Reply with quote

Thanks DS.
Would you be able to pinpoint a sample script for me?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Jun 27, 2012 9:20 pm
Reply with quote

nartcr wrote:
Thanks DS.
Would you be able to pinpoint a sample script for me?


i mean, how about you searching for my solution,
instead of me exerting any effort to come up with a solution
to my problem.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Wed Jun 27, 2012 9:38 pm
Reply with quote

Hello,

Quote:
Would you be able to pinpoint a sample script for me?
No, because you need to find a script that works as desired on Your system. I don't have access to your system . . .
Back to top
View user's profile Send private message
nartcr

New User


Joined: 06 Jun 2007
Posts: 83
Location: anada

PostPosted: Wed Jun 27, 2012 9:39 pm
Reply with quote

No DS, thats not my intention.
Just trying to understand what did you mean by pre-NDM step that would build card dynamically. I am already using ctlcard to override the values at run time.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Wed Jun 27, 2012 9:39 pm
Reply with quote

Follow on:

You have co-workers, some kind of "leader/manager", as well as local network/NDM support people who should know. . .
Back to top
View user's profile Send private message
nartcr

New User


Joined: 06 Jun 2007
Posts: 83
Location: anada

PostPosted: Wed Jun 27, 2012 9:41 pm
Reply with quote

Thanks DS, i would do the same.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


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

PostPosted: Wed Jun 27, 2012 9:44 pm
Reply with quote

There are exmples in the forum - not necessarily in this section (but I think there are). All you have to do is use the search function or Google.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Wed Jun 27, 2012 9:52 pm
Reply with quote

One more time icon_smile.gif

You could get the data multiple ways. One might be thru rexx. another might be EZACFM1.

For example, this:
Code:
//SYMBOLS EXEC PGM=EZACFSM1                                     
//SYSIN   DD DATA                                               
                                                               
 SIGNON CASE=YES                                               
 SUBMIT PROC=NARARTAS -                                         
        &DSNIN=VF1209.DBKPB.N.CLIENT.G9112V00(+1)  -           
        &DATE=&LYR2&LMON&LDAY                       -           
        &TIME=&HR&MIN&SEC                                       
/*                                                             
//SYSOUT DD SYSOUT=*                                           


Generates:
Code:
SIGNON CASE=YES                                       
SUBMIT PROC=NARARTAS -                                 
       &DSNIN=VF1209.DBKPB.N.CLIENT.G9112V00(+1)  -   
       &DATE=120627                       -           
       &TIME=162033                                   
Back to top
View user's profile Send private message
parsesource

New User


Joined: 06 Feb 2006
Posts: 97

PostPosted: Thu Jun 28, 2012 12:31 am
Reply with quote

connect direct itself has various variables to generate a date and timestamp at runtime. there is no need to use jcl utilities or similar.

ibmmainframes.com/about39059.html
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Thu Jun 28, 2012 1:06 am
Reply with quote

Hello,

If NDM can do this itself - great.

Please post a tested example that provides what was requested.
Back to top
View user's profile Send private message
nartcr

New User


Joined: 06 Jun 2007
Posts: 83
Location: anada

PostPosted: Thu Jun 28, 2012 7:37 pm
Reply with quote

Hi,

Yes, i have used connect direct variables above -- %SUBDATE1 and SUBTIME.

I was suspecting that it could be some incorrect formatting in script.

The error message is

Code:
SCIC000I Connect:Direct - RC=00000008 MSG=SCBC085I             @ 12:33
   SHORT TEXT => SCBC085I Invalid keyword in TO parameter list of a COPY command
      UIERRM1 => STEP2 COPY  TO(20120627                                       
    LONG TEXT => An unsupported or misspelled keyword was found within the     
                 'TO' parameter list of a COPY command.                         
                                                                               
                 EXAMPLE:                                                       
                        COPY FROM (DSN=MY.SRC) COMPRESS PRIME=X'40' -           
                        TO (DSN=dsn DCB=(....) UNIT=unit VOL=SER=volser)       
                                                                               
                                                                               
                                                                               
                 SYSTEM ACTION: Return to invoker with RC=8.                   
                                                                               
                 RESPONSE: Correct the command and retry.                       


I am yet to see if IEACFSM1 can provide the same results.
Back to top
View user's profile Send private message
nartcr

New User


Joined: 06 Jun 2007
Posts: 83
Location: anada

PostPosted: Thu Jun 28, 2012 8:17 pm
Reply with quote

Finally i was able to see the problem after many trail and error methods:


Code:
               &DSNOUT=\/apps/mule/securitas/NARA/input/NARA\           -
               &TIME=%SUBTIME                                           -
               &DATE=%SUBDATE1                                           
          SYMBOL &FNAME=&DSNOUT || &DATE || &TIME || .TXT               


It looks like when i have to append date and time, i have to enclose in backward slash '\' instead of quotes.

Thanks a lot for the help provided.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Thu Jun 28, 2012 8:57 pm
Reply with quote

Good to hear it is working - thank you for letting us know and posting your solution icon_smile.gif

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

New User


Joined: 06 Feb 2006
Posts: 97

PostPosted: Thu Jun 28, 2012 10:43 pm
Reply with quote

dick scherrer wrote:
Hello,

If NDM can do this itself - great.

Please post a tested example that provides what was requested.


google says

www-01.ibm.com/support/docview.wss?uid=swg21536099
Back to top
View user's profile Send private message
GautamSid

New User


Joined: 04 Jun 2021
Posts: 7
Location: India

PostPosted: Sun Jun 06, 2021 2:55 pm
Reply with quote

is there a way to add yesterdays date to the file name by any methods? Will below work?

Code:

               &DSNOUT=\/apps/mule/securitas/NARA/input/NARA\           -
               &TIME=%SUBTIME                                           -
               &DATE=%SUBDATE1 -(-1)                                         
          SYMBOL &FNAME=&DSNOUT || &DATE || &TIME || .TXT
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1243
Location: Bamberg, Germany

PostPosted: Sun Jun 06, 2021 4:42 pm
Reply with quote

icon_exclaim.gif Do not hijack year old topics. This should be locked now.
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 Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Connect Direct 6.3 for Z/OS All Other Mainframe Topics 20
No new posts To get the the current time DFSORT/ICETOOL 13
No new posts RC query -Time column CA Products 3
Search our Forums:

Back to Top