Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Output CURRENT DATE - 1 DAY with Syncsort

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
anish.ibm

New User


Joined: 28 Jun 2007
Posts: 23
Location: Bangalore

PostPosted: Mon Nov 05, 2007 9:46 pm    Post subject: Output CURRENT DATE - 1 DAY with Syncsort
Reply with quote

Hi All ,


How to insert the Current date - 1 day into a dataset using Date features in DFSORT. Using DATE we can insert current date , but how to insert the current date - 1 Day .

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

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Mon Nov 05, 2007 10:01 pm    Post subject:
Reply with quote

It's not clear exactly what you want to do. Do you want to insert date-1 in every record or in one record or what? What format do you want for the inserted date-1?

At any rate, DFSORT can insert date-1 day constants in various forms with the BUILD operand. For example:

Code:

...
//SORTIN DD *
RECORD
//SYSIN DD *
   OPTION COPY
   INREC BUILD=(DATE1-1)
/*


Will insert a date-1 day constant in the form C'yyyymmdd'. For complete information on DFSORT's date-n and date+n constants, see:

www.ibm.com/servers/storage/support/software/sort/mvs/peug/

If you want more specific help, explain what you want to do in more detail with an example, if appropriate.
Back to top
View user's profile Send private message
anish.ibm

New User


Joined: 28 Jun 2007
Posts: 23
Location: Bangalore

PostPosted: Mon Nov 05, 2007 10:49 pm    Post subject:
Reply with quote

Hi Frank,

Iam able to execute the below card

SORT FIELDS=COPY
OUTREC BUILD=(DATE1(.))

But unable to execute this

SORT FIELDS=COPY
OUTREC BUILD=(DATE1(.)-1) .... Getting Syntax Error

My requirement is ..single record should be replaced with Current date - 1 day.

Thanks
Anish.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Mon Nov 05, 2007 11:29 pm    Post subject:
Reply with quote

Quote:
OUTREC BUILD=(DATE1(.)-1) .... Getting Syntax Error


Please post the //SYSOUT messages you received.
Back to top
View user's profile Send private message
anish.ibm

New User


Joined: 28 Jun 2007
Posts: 23
Location: Bangalore

PostPosted: Mon Nov 05, 2007 11:36 pm    Post subject: Reply to: How to insert CURRENT DATE - 1 DAY into a DATASET
Reply with quote

Hi Frank,

Please find the Sysout for the Syntax error below

Code:

SYSIN :                                       
  SORT FIELDS=COPY                           
  OUTREC BUILD=(DATE1(.)-1)                   
                        *                     
WER268A  OUTREC STATEMENT  : SYNTAX ERROR     
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000


Thanks
Anish.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Nov 06, 2007 12:08 am    Post subject:
Reply with quote

The statement I posted using DATE1-1 works fine with DFSORT. But the WER messages indicate you're using Syncsort, not DFSORT.
Back to top
View user's profile Send private message
anish.ibm

New User


Joined: 28 Jun 2007
Posts: 23
Location: Bangalore

PostPosted: Tue Nov 06, 2007 12:33 am    Post subject:
Reply with quote

Hi Frank,

I tried all the possiblities using ICETOOL,ICEMAN,SORT , but still iam getting the same error message. SYNCSORT FOR Z/OS 1.2.2.3R and SYNCTOOL RELEASE 1.5.2 was installed in my Shop. Is it possible to get the result what i need throught this product.


Thanks
Anish.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Nov 06, 2007 2:40 am    Post subject:
Reply with quote

Anish,

I'm a DFSORT developer. DFSORT and Syncsort are competitive products. I'm happy to answer questions on DFSORT and DFSORT's ICETOOL, but I don't answer questions on Syncsort.
Back to top
View user's profile Send private message
anish.ibm

New User


Joined: 28 Jun 2007
Posts: 23
Location: Bangalore

PostPosted: Tue Nov 06, 2007 6:54 am    Post subject: Reply to: Output CURRENT DATE - 1 DAY with Syncsort
Reply with quote

HI All,

Can any epert in SYNCSORT explain me how to get the CURRENT DATE - 1 DAY . SYNCSORT allows for CURRENT DATE but not for PAST or FUTURE DATEs.


Thanks,
Anish.
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Tue Nov 06, 2007 9:10 am    Post subject:
Reply with quote

anish.ibm
Quote:
SYNCSORT FOR Z/OS 1.2.2.3R and SYNCTOOL RELEASE 1.5.2 was installed in my Shop. Is it possible to get the result what i need throught this product

Its not possible with this
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts SMTP the current generation number of... Jyothi Kulunde JCL & VSAM 4 Thu May 04, 2017 4:08 pm
No new posts LISTIDR compiled date/time jerryte IBM Tools 3 Thu Apr 20, 2017 7:37 pm
No new posts SUBSTR for Date functions Shaheen Shaik DB2 4 Thu Apr 06, 2017 2:14 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us