View previous topic :: View next topic
|
Author |
Message |
Sureet Mookherjee
New User
Joined: 08 May 2009 Posts: 19 Location: India
|
|
|
|
I have a requirement to create a sortcard to remove the last field from the extract file the last field start from 1018 and ends at 1027. How will i achieve this? i am using syncsort. Can i use outrec to do this if possible can someone send me the syntax. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Quote: |
if possible can someone send me the syntax. |
Do you not have access to
(a) The product manuals
(b) A current example in use at your site
(c) Google - where I quickly found notes on the OMIT / INCLUDE parameters
This is a HELP forum, not a do my job for me forum. |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
Code: |
//SYSIN DD *
SORT FIELDS=COPY
INREC FIELDS=(1,1017)
/*
|
This remove remove data from 1018 to 1027 of input file.. []
Give SORTOUT LRECL=1017
@Expat,
OMIT/INCLUDE is not needed as records are not to be filtered. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Quote: |
@Expat,
OMIT/INCLUDE is not needed as records are not to be filtered. |
Correct - Looks like it's going to be one of those days |
|
Back to top |
|
|
arindambanerjee
New User
Joined: 30 Jun 2007 Posts: 39 Location: India
|
|
|
|
Hi Sureet,
You can use the below in your sort card:
//SYSIN DD *
SORT FIELDS=COPY
OUTREC FILEDS=(1:1,1017)
/*
Note that while declaring your sysout file use lrecl=1017.
Hope this will help you.
Thanks!!! |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
arindambanerjee wrote: |
Hi Sureet,
You can use the below in your sort card:
//SYSIN DD *
SORT FIELDS=COPY
OUTREC FILEDS=(1:1,1017)
/*
Note that while declaring your sysout file use lrecl=1017.
|
Are your sure?
What about sortout?
Have you tested the code? |
|
Back to top |
|
|
arindambanerjee
New User
Joined: 30 Jun 2007 Posts: 39 Location: India
|
|
|
|
What about sortout? ---> it will be taken care by
OUTREC FILEDS=(1:1,1017).
Please note that we have to give continuation mark which i missed earlier:
//SYSIN DD *
SORT FIELDS=COPY -
OUTREC FILEDS=(1:1,1017) -
/*
|
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
arindambanerjee wrote: |
Note that while declaring your sysout file use lrecl=1017. |
arindambanerjee wrote: |
Please note that we have to give continuation mark which i missed earlier |
There is no need for either of the above. In fact the latter one has syntax error. Please do test your code before posting. The solution posted by Sambhaji looks fine. |
|
Back to top |
|
|
|