Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Connect:Direct - Add timestamp in the TODSN filename in JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
aftabkhan

New User


Joined: 20 Mar 2009
Posts: 3
Location: Mumbai

PostPosted: Fri Mar 20, 2009 7:19 pm    Post subject: Connect:Direct - Add timestamp in the TODSN filename in JCL
Reply with quote

Hi Friends,

I have a sequential file which has to be sent to a Java console using connect:direct. The problem is that i have to include timestamp in the output file name i.e.:
FROMDSN=AFYXXX.xxx.abc
TODSN=aftab_khan_[YYYYMMDD]T[hhmmss].CSV

Can anyone please tell me how to include the date and time in a Connect:direct JCL.

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

superk

Moderator Team Head


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

PostPosted: Fri Mar 20, 2009 7:25 pm    Post subject: Reply to: Connect:Direct - Add timestamp in the TODSN filena
Reply with quote

You can add date and time values to a filename from within the Process. There are a bunch of standard variables available for your use.

Your job scheduling system might be able to supply those values. Check with your support team.

Outside of that, you'll need a program to build your control statements with the supplied values. Anything should work: COBOL,Assembler,REXX,CLIST,SAS,DFSORT,SYNCSORT,Easytrieve,EZACFSM1, etc.
Back to top
View user's profile Send private message
aftabkhan

New User


Joined: 20 Mar 2009
Posts: 3
Location: Mumbai

PostPosted: Sun Mar 22, 2009 2:42 am    Post subject: Reply to: Connect:Direct - Add timestamp in the TODSN filena
Reply with quote

Hi,

Thanks for your reply.

Can you give me example of some standard variables.
Back to top
View user's profile Send private message
superk

Moderator Team Head


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

PostPosted: Sun Mar 22, 2009 7:53 am    Post subject: Reply to: Connect:Direct - Add timestamp in the TODSN filena
Reply with quote

Quote:

Connect:Direct for z/OS provides the following intrinsic symbolic variables that you can use to substitute user-defined values when a Process is executed.

%DD2DSN Specifies an allocated DD statement, which references a DSN to be passed to a Process being submitted (for Connect:Direct for z/OS).

%JDATE Specifies the date the Process was submitted in Julian format. The variable is resolved as the submission date of the Process in the format yyyyddd. Among other uses, the value returned is suitable for
constructing a file name on the node receiving the file.
The value of the variable is resolved at Process submit time. The value
will correspond to the date on which the Process was submitted,
regardless of when or how many times the Process is actually executed.

%NUM1 Specifies the submission time of the Process in minutes, seconds, and fraction of seconds in the format mmssth.

%NUM2 Specifies the submitted time of a Process as the low order 4 bits of the milliseconds of the time expressed as 1 hex digit (a value from 0 through 15 expressed as 0 through F).

%PNODE PNODE name where the submit occurs.

%PRAND Pseudo-random number (6 hex digits).

%SUBDATE Specifies the date the Process was submitted in Gregorian format. The variable is resolved as the submission date of the Process in the format cyymmdd where c is the century indicator and is set to 0 for year 19yy or 1 for year 20yy. The value returned can be used to create a file name on the node receiving the file.

%SUBDATE1 Use this parameter to substitute the submitted date in the yyyymmdd date format.

%SUBDATE2 Use this parameter to substitute the submitted date in the yyyyddmm date format.

%SUBDATE3 Use this parameter to substitute the submitted date in the mmddyyyy date format.

%SUBDATE4 Use this parameter to substitute the submitted date in the ddmmyyyy date format.

%SUBTIME Specifies the time the process was submitted. The variable is resolved as the submission time of the process in the format hhmmss. The return value can be used to create a file name on the node receiving the file. The value of the variable is resolved at Process submit time. The value will correspond to the time at which the Process was submitted,
regardless of when or how many times the Process is actually executed.

%USER Specifies a variable that resolves to the user submitting the Process.
Back to top
View user's profile Send private message
YMPaines

New User


Joined: 24 Apr 2007
Posts: 2
Location: Newport Beach, CA

PostPosted: Sat Nov 21, 2009 3:21 am    Post subject: Intrinsic symbolic variable
Reply with quote

Can you provide a reference source for the intrinsic symbolic variable data above? I need to determine if there is a date parameter that will resolve to a mmddyy format.
Back to top
View user's profile Send private message
superk

Moderator Team Head


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

PostPosted: Sat Nov 21, 2009 3:31 am    Post subject: Reply to: Connect:Direct - Add timestamp in the TODSN filena
Reply with quote

The "Understanding Connect:Direct Processes" guide details that information. MMDDYYYY is %SUBDATE3.
Back to top
View user's profile Send private message
YMPaines

New User


Joined: 24 Apr 2007
Posts: 2
Location: Newport Beach, CA

PostPosted: Sat Nov 21, 2009 3:49 am    Post subject:
Reply with quote

The vendor indocates that they can't accept an eight character date, it must be only six characters.
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 DIrect link of dynam/nodynam nkjain87 COBOL Programming 2 Mon Apr 24, 2017 6:23 pm
No new posts Connect:Direct - RC=000000FF MSG=SVTM... R.Manivannan All Other Mainframe Topics 3 Fri Apr 21, 2017 1:30 am
No new posts Fail to change physical VSAM filename... jacobdng CICS 7 Fri Jan 20, 2017 12:36 pm
No new posts Converting EBCDIC to Unicode (TimeStamp) muralikrishnan_new COBOL Programming 2 Mon Jul 25, 2016 10:42 pm
No new posts DB2 CONNECT query mistah kurtz DB2 3 Fri Jul 15, 2016 6:37 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us