Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us