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
 

 

Sorting Variable length file with SYNCSORT

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

New User


Joined: 15 Apr 2005
Posts: 8

PostPosted: Tue Dec 05, 2006 7:30 pm    Post subject: Sorting Variable length file with SYNCSORT
Reply with quote

I have Variable length file. I need to find the following:

Format
01 Record.
10 Init-data PIC X(10).
10 Variable-CTR PIC 9(4) comp-3.
10 Detail-data OCCURS 0 to 100 TIMES depending on Variable-CTR
15 DATE.
20 Date-CC PIC XX.
20 Date-YY PIC XX.
20 FILLER PIC X.
20 Date-MM PIC XX.
20 FILLER PIC X.
20 Date-DD PIC XX.

a) Records with Date = blank or Zeroes
b) Records with Date > Current Date + 29 days.

Can this done with Syncsort ?
Back to top
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Tue Dec 05, 2006 7:47 pm    Post subject:
Reply with quote

pvsuji4,

Which of the 0 to 100 dates do you wish to sort on?
Back to top
View user's profile Send private message
saipv

New User


Joined: 15 Apr 2005
Posts: 8

PostPosted: Tue Dec 05, 2006 8:00 pm    Post subject: Re: Sorting Variable length file
Reply with quote

I need to SORT the first occurance
Back to top
View user's profile Send private message
saipv

New User


Joined: 15 Apr 2005
Posts: 8

PostPosted: Tue Dec 05, 2006 8:19 pm    Post subject:
Reply with quote

1. I am looking for the first occurance of the DATE value = blank or Zeroes
2. first occurance of DATE > current date + 29 days
Back to top
View user's profile Send private message
saipv

New User


Joined: 15 Apr 2005
Posts: 8

PostPosted: Wed Dec 06, 2006 1:02 am    Post subject:
Reply with quote

hi All,

It's working with the following:

Code:

//SYSIN    DD *                                           
  OPTION VLSHRT NOVLSCMP                             
  SORT FIELDS=COPY                                 
  OUTFIL FILES=01,INCLUDE=(128,18,CH,GT,DATE4+29)   
//*
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 Sorting group data rajella DFSORT/ICETOOL 4 Sun Jan 22, 2017 11:32 pm
No new posts SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 5 Sat Jan 21, 2017 4:02 am
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm


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