IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to remove the last field from the extract using sort


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Sureet Mookherjee

New User


Joined: 08 May 2009
Posts: 19
Location: India

PostPosted: Fri Aug 07, 2009 11:27 am
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Aug 07, 2009 11:46 am
Reply with quote

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
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Fri Aug 07, 2009 12:02 pm
Reply with quote

Code:

//SYSIN    DD *
  SORT FIELDS=COPY 
  INREC FIELDS=(1,1017)
/*


This remove remove data from 1018 to 1027 of input file.. [icon_smile.gif]
Give SORTOUT LRECL=1017

@Expat,
OMIT/INCLUDE is not needed as records are not to be filtered.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Aug 07, 2009 12:19 pm
Reply with quote

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 icon_confused.gif
Back to top
View user's profile Send private message
arindambanerjee

New User


Joined: 30 Jun 2007
Posts: 39
Location: India

PostPosted: Fri Aug 07, 2009 1:59 pm
Reply with quote

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
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Fri Aug 07, 2009 2:02 pm
Reply with quote

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
View user's profile Send private message
arindambanerjee

New User


Joined: 30 Jun 2007
Posts: 39
Location: India

PostPosted: Fri Aug 07, 2009 2:07 pm
Reply with quote

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
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Fri Aug 07, 2009 2:28 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
Search our Forums:

Back to Top