View previous topic :: View next topic
|
Author |
Message |
kedianirmal
New User
Joined: 08 Feb 2008 Posts: 82 Location: Bangalore, India
|
|
|
|
I want to read the system run date YYYYMMDD and write into a member file.
Nirmal |
|
Back to top |
|
|
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
Nirmal,
Where are you reading the date from? Does it already exist in a file, or are you just pulling in the current system date? And where are you writing it out to... A new data set as a stand alone record or MODing on to an existing file? Is it being inserted on every record or only once as a HEADER or TRAILER?
If you would like further assistance, you need to provide more information. Please provide your complete requirements, including the RECFM and LRECL of the files, and any pertinent field positions and lengths. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
I would go with either:
Code: |
//SYM EXEC PGM=EZACFSM1
//SYSIN DD *
&YR4&LMON&LDAY
/*
//SYSOUT DD DISP=SHR,DSN=MY.PDS(MEMBER)
|
or
Code: |
//SORT EXEC PGM=ICEMAN
//SORTIN DD *
DUMMY
/*
//SORTOUT DD DISP=SHR,DSN=MY.PDS(MEMBER)
//SYSOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INREC OVERLAY=(1:DATE1,80:X)
/*
|
|
|
Back to top |
|
|
kedianirmal
New User
Joined: 08 Feb 2008 Posts: 82 Location: Bangalore, India
|
|
|
|
I want to pull the current system date in the JCL and write the same into the member having a LRECL=80 and RECFM=FB.
The date will be the only data in the member file. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
I want to pull the current system date in the JCL and write the same into the member |
That is exactly what Kevin has shown you 2 ways to do. . .
Did you run the examples posted? If not, why not? If yes, what happened? |
|
Back to top |
|
|
kedianirmal
New User
Joined: 08 Feb 2008 Posts: 82 Location: Bangalore, India
|
|
|
|
Thanks a lot. |
|
Back to top |
|
|
vishnu.priya
New User
Joined: 28 Nov 2007 Posts: 11 Location: hyderabad
|
|
|
|
hi
after getting the system date i want to manipulate that date in the jcl
For example :
if current date is 20090128
i want to subtract 1 day from it is thr any way to do it |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
What have you tried so far.
What documents have you read for the two examples shown by Kevin ? I am certain that DFSORT has some great date manipulation facilities. Why not take a look ? |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
You can use DFSORT's DATE1-1 function to subtract 1 from the current date (yyyymmdd form).
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD *
DUMMY
/*
//SORTOUT DD DSN=pds(member),... FB/80 pds member
//SYSIN DD *
OPTION COPY
INREC BUILD=(DATE1-1,80:X)
/*
|
|
|
Back to top |
|
|
vishnu.priya
New User
Joined: 28 Nov 2007 Posts: 11 Location: hyderabad
|
|
|
|
hi Frank
thanks for the quick reply
i tried doing as said by you, but got U0016 abend
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD *
DUMMY
/*
//SORTOUT DD DSN=XXXX.DATE.SORT.PGMS.PDS(DATE1SUB)
//SYSIN DD *
OPTION COPY
INREC BUILD=(DATE1-1,80:X)
/* |
Can you please suggest on how can i proceed further
[/b] |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
You need to post the diagnostic info presented when the run terminated. Include message ids as well as message text when you post this. |
|
Back to top |
|
|
vishnu.priya
New User
Joined: 28 Nov 2007 Posts: 11 Location: hyderabad
|
|
|
|
hello dick
Code: |
SYSIN :
OPTION COPY
INREC BUILD=(DATE1-1,80:X)
*
WER268A INREC STATEMENT : SYNTAX ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE |
this is the message i got with USER=0016 Abend
Edited: Please use BBcode when You post some code/error, that's rather readable, Thanks... Anuj |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
vishnu.priya,
Which version of SyncSort you're running? It'll be there on the top of your SYSOUT. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Hi,
You might like to check this link www.ibmmainframes.com/viewtopic.php?t=32960&highlight= but that again depends on which version of SyncSort is in use at your shop.
Just fyi..Other JCL posted by Frank does work on DFSORT site - I've just verified it with one of my friend whose shop uses DFSORT and it didn't work for you because either you dont' have the latest (1.3 or above) version of SyncSort or you don't have DFSORT (which is evident from your sysout messages). |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
vishnu.priya,
I tried executing your JCL and it works fine for my version which is SyncSort for z/OS Release 1.3.
Also I could see the below in my manual as pointed out by Anuj.
SyncSort for z/OS Release 1.3 Manual wrote: |
• Offset date support for the current date constant has been added. The current date can be specified with an offset of an increased or decreased number of days or months. |
|
|
Back to top |
|
|
vishnu.priya
New User
Joined: 28 Nov 2007 Posts: 11 Location: hyderabad
|
|
|
|
thanks arcvns and anuj, as said by you, ours is a older version of syncsort (SYNCSORT FOR Z/OS 1.2.2.2R version)
Thanks again for the information |
|
Back to top |
|
|
lohithegde
New User
Joined: 18 May 2008 Posts: 31 Location: Chennai
|
|
|
|
Hi Visnu
The both Code Posted by SUPERK is working fine....If it is not working in your SETUP, contact your ADMIN
Thanks to superk for good Example
Rehards
Lohit |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
lohithegde wrote: |
The both Code Posted by SUPERK is working fine....If it is not working in your SETUP, contact your ADMIN
|
Yes, they will work well but the Vishnu in intrested in getting one date less than the current date..with SYNCSORT FOR Z/OS 1.2.2.2R or something else. |
|
Back to top |
|
|
|