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 Match two files using multiple keys a... santoshks1987 SYNCSORT 10 Fri Aug 18, 2017 10:50 am
No new posts Move from Comp3 variable to Edited Va... sreekusr COBOL Programming 8 Thu Aug 10, 2017 4:20 pm
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm
This topic is locked: you cannot edit posts or make replies. rexx code to create a ps file Bharath Vikraman CLIST & REXX 4 Mon Aug 07, 2017 10:30 am
No new posts Split file based on comparsion to 2 f... Div Grad DFSORT/ICETOOL 3 Thu Jul 27, 2017 9:16 pm


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