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

Output CURRENT DATE - 1 DAY with Syncsort


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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 Developer


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

PostPosted: Mon Nov 05, 2007 10:01 pm
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:

Use [URL] BBCode for External Links

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
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 Developer


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

PostPosted: Mon Nov 05, 2007 11:29 pm
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
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 Developer


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

PostPosted: Tue Nov 06, 2007 12:08 am
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
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 Developer


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

PostPosted: Tue Nov 06, 2007 2:40 am
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Compare only first records of the fil... SYNCSORT 7
Search our Forums:

Back to Top