SORT Variable File



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

SORT Variable File

Postby Vineet » Sun Dec 05, 2010 2:30 am

I have a Variable Length File having LRECL = 550. It's a Delimited File. There is a Date Field. My Requirement is If Date Field is = 01/01/1900 That Record should Not be Included in Out Put File. Problem I'm Facing is that being a Variable Length File Column Position of Date Field is Not Fixed. So how can I get Desire Result? Below is Example.

1234|ABCD|01/01/1900||XYZ| ----> Date Field Starts at Position 11.Record Should get Rjected.
1234567|ABCDEFG|01/01/1900|ABC123|XYZ| ----> Date Field Starts at Position 17.Record Should get Rjected.
98765439|ABXYZ|02/02/2010|XYZ|XYZ123| -----> Record Should get Printed to O/P File.
98765439|ABxyz123|02/02/2010|XYZ|XYZ123| -----> Record Should get Printed to O/P File.
1|AB|01/01/1900|ABC123|XYZ| ------>Date Field Starts at Position 06.Record Should get Rjected.

Start Column Position Of Date Field is Not Fixed. Output File is going to be a Variable Length File having LRECL = 550 Delimited (Same as input File).
Vineet
 
Posts: 86
Joined: Tue Jun 19, 2007 11:38 am
Has thanked: 0 time
Been thanked: 0 time

Re: SORT Variable File

Postby MrSpock » Sun Dec 05, 2010 3:37 am

Can't you use a SubString(SS) in either an INCLUDE or OMIT, i.e.:

...
  OPTION COPY
  OUTFIL OMIT=(5,545,SS,EQ,C'|01/01/1900')
...
User avatar
MrSpock
Global moderator
 
Posts: 809
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 4 times

Re: SORT Variable File

Postby Vineet » Sun Dec 05, 2010 5:11 pm

Hi Spock,

Can U Be More Clear On This. As I stated its a Variable Length File & Position Of Date Field is Not Fix. In UR SORT Card U Specify OUTFIL OMIT = (5,545,SS,EQ,C'|01/01/1900'), where as length of File is 550. I apprfeciate if U can Provide me the JCL & SORT Card. How To Define Substring in SORT Card.

Thanks
Kind Rgds
Vineet
 
Posts: 86
Joined: Tue Jun 19, 2007 11:38 am
Has thanked: 0 time
Been thanked: 0 time

Re: SORT Variable File

Postby enrico-sorichetti » Sun Dec 05, 2010 8:21 pm

all reading Your posts would be appreciate if You could use normal english words instead of SMSish ones
this is a professional forum, not a chat line :D
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3006
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 165 times

Re: SORT Variable File

Postby dick scherrer » Sun Dec 05, 2010 11:31 pm

Hello,

I apprfeciate if U can Provide me the JCL & SORT Card.
Is there some reason you cannot clone existing SORT JCL. . . :?

where as length of File is 550
How To Define Substring in SORT Card.
The "sort card" Mr Spock posted defines the substring. Change the length as needed.

You need to create comprehensive test data and make sure the process works for all cases. Running successfully against a bit of "real" data is not a comprehensive test.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: SORT Variable File

Postby Vineet » Sun Dec 05, 2010 11:41 pm

Hu Dick,

I have Never Use Substring in JCL, for this reason I asked for JCL / SORT Card. Can U Provide me any Sample JCL or Document which Talks about How to use SUBSTRING in SORT. A Query, Whn having Variable File where Position of Field is Not Certain (In My Case Date Field) How to define the Start Position. I Appreciate if U can help me out.

Thanks
Rgds
Vineet
 
Posts: 86
Joined: Tue Jun 19, 2007 11:38 am
Has thanked: 0 time
Been thanked: 0 time

Re: SORT Variable File

Postby dick scherrer » Sun Dec 05, 2010 11:58 pm

Hello,

I have Never Use Substring in JCL, for this reason I asked for JCL / SORT Card.
After today, you will have used substring. It is NOT in JCL - it is in the "sort card".

The Syncsort documentation describes substring. If you do not have the documentation, you should contact Syncsort and they can tell you how to download the material.


I Appreciate if U can help me out.
You have been "helped out". . .

Please explain why you have not copied some existing sort jcl and changed it for your use (using the "sort card" provided by Mr Spock to control the process).
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: SORT Variable File

Postby Vineet » Mon Dec 06, 2010 12:20 am

Hi Dick,

I Dnt have any JCL ready for This. I was Not Sure wheather its my requirement is possible using SORT. So I just Posted this Requirement. Does this mean in Sort Card we have to Provide Start Position, Total Length,SS & the Criteria. Please Clarify for Substring do we need to Use 'SS'. I appreciate if U can provide me Syntax.

Thanks
Kind Rgds
Vineet
 
Posts: 86
Joined: Tue Jun 19, 2007 11:38 am
Has thanked: 0 time
Been thanked: 0 time

Re: SORT Variable File

Postby dick scherrer » Mon Dec 06, 2010 1:48 am

Hello,

You are making this far more difficult/confusing . . .

Can you not find one other sort that is running on your system? Can you not ask someone who also uses your system the name of a job that uses the sort? That is the place to start - with a sort job that already runs succerssfully on your system.

Then, change the job for your input and output datasets - first using test data not a "real" run. Then copy in the sort control provided earlier and modify if needed. Submit the job. . .

Post a reply here showing the success or failure of the job. Post the jcl & control info you use and the informational output generated by the sort.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: SORT Variable File

Postby Vineet » Mon Dec 06, 2010 2:13 am

I am not making anythng difficult/confusing. In My System There is No such SORT Exist, Otherwise I would have taken that JCL & Tested My Requirement, this is the Reason I posted Here.Can U provide me the Syntax Of SORT.

Thanks
Kind Rgds
Vineet
 
Posts: 86
Joined: Tue Jun 19, 2007 11:38 am
Has thanked: 0 time
Been thanked: 0 time

Next

Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post