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

can we create file using SYNCSORT


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
saagu

New User


Joined: 15 May 2008
Posts: 41
Location: Chennai

PostPosted: Mon Aug 16, 2010 6:14 pm
Reply with quote

I need 2 dates in a file. The first date is the current month and year hardcoding the day to be 01 always. The second date should have the current month day 01 and two years back.

Here is the sample
DATE 08/01/10 08/01/08 PURGE

Could anyone help me on this.

Saagu
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Aug 16, 2010 6:21 pm
Reply with quote

They might do if you posted into the correct forum.
Topic moved.
Back to top
View user's profile Send private message
Ronald Burr

Active User


Joined: 22 Oct 2009
Posts: 293
Location: U.S.A.

PostPosted: Mon Aug 16, 2010 6:40 pm
Reply with quote

Look up INREC and OUTREC processing in the SyncSort manual. Pay particular attention to the use of the &DATE function ( actually described in the OUTFIL/OUTREC(BUILD) processing section ). Let us know if you still have questions after reading the manual.
Back to top
View user's profile Send private message
saagu

New User


Joined: 15 May 2008
Posts: 41
Location: Chennai

PostPosted: Mon Aug 16, 2010 7:12 pm
Reply with quote

could you please provide me the link where i can get the &date processing for sync sort .

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

Active User


Joined: 22 Oct 2009
Posts: 293
Location: U.S.A.

PostPosted: Mon Aug 16, 2010 7:46 pm
Reply with quote

Sorry, but no. If SyncSort wanted to make their manuals "public", they would do so at their own web site. Since they do not do so, it would constitute copyright infringement to post them online without express written permission.
That being said, the syntax for the &DATE function in SyncSort is the same as the syntax for the &DATE function in DFSORT - so you could read the DFSORT manual for usage rules. Open the DFSORT manual and do a search on &DATE.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Aug 16, 2010 8:07 pm
Reply with quote

Hello,

If your organization is licensed to use Syncsort, all of the material may be downloaded free from Syncsort support. . .

Alissa Margulies
SyncSort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Back to top
View user's profile Send private message
saagu

New User


Joined: 15 May 2008
Posts: 41
Location: Chennai

PostPosted: Mon Aug 16, 2010 9:14 pm
Reply with quote

Thanks for the info.

I can see the option &DATE=(YMD-) will work , but i could not findout the option to default day as 01 .

Thanks,
Saagu
Back to top
View user's profile Send private message
Ronald Burr

Active User


Joined: 22 Oct 2009
Posts: 293
Location: U.S.A.

PostPosted: Tue Aug 17, 2010 12:17 am
Reply with quote

Create the YMD format during INREC processing. Overlay the DAY with '01' during OUTREC processing. That's why I said to look at INREC and OUTREC processing as well.
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 496
Location: USA

PostPosted: Wed Aug 18, 2010 11:07 pm
Reply with quote

Here is one way to accomplish this task:
Code:
//SYSIN DD *                                                   
  INREC IFTHEN=(WHEN=INIT,                                     
  BUILD=(C'DATE ',6:&DATE=(MDY/),15:&DATE=(MDY/),24:C'PURGE')),
  IFTHEN=(WHEN=INIT,                                           
  OVERLAY=(9:C'01',18:C'01',21:21,2,ZD,SUB,+2,EDIT=(TT)))     
  SORT FIELDS=COPY                                             
/*                                                             
Back to top
View user's profile Send private message
saagu

New User


Joined: 15 May 2008
Posts: 41
Location: Chennai

PostPosted: Fri Aug 20, 2010 12:57 pm
Reply with quote

Thank a lot Allisa. Its working now.

thanks for all.
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top