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 Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm
No new posts Updating a VSAM file with DISP=OLD sheersh JCL & VSAM 8 Tue Mar 14, 2017 6:14 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm


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