View previous topic :: View next topic
|
Author |
Message |
aftabkhan
New User
Joined: 20 Mar 2009 Posts: 3 Location: Mumbai
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
aftabkhan
New User
Joined: 20 Mar 2009 Posts: 3 Location: Mumbai
|
|
|
|
Hi,
Thanks for your reply.
Can you give me example of some standard variables. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
YMPaines
New User
Joined: 24 Apr 2007 Posts: 2 Location: Newport Beach, CA
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
The "Understanding Connect:Direct Processes" guide details that information. MMDDYYYY is %SUBDATE3. |
|
Back to top |
|
|
YMPaines
New User
Joined: 24 Apr 2007 Posts: 2 Location: Newport Beach, CA
|
|
|
|
The vendor indocates that they can't accept an eight character date, it must be only six characters. |
|
Back to top |
|
|
GautamSid
New User
Joined: 04 Jun 2021 Posts: 7 Location: India
|
|
|
|
is there a way to add yesterdays date in the TO DSN file name? |
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1348 Location: Bamberg, Germany
|
|
|
|
Do not hijack year old topics. This should be locked now. |
|
Back to top |
|
|
|