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
 

 

How to remove the last field from the extract using sort

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: How to remove the last field from the extract using sort
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: 8593
Location: Back in jolly old England

PostPosted: Fri Aug 07, 2009 11:46 am    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Fri Aug 07, 2009 12:19 pm    Post subject:
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    Post subject: Reply to: How to remove the last field from the extract usin
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    Post subject:
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    Post subject: Reply to: How to remove the last field from the extract usin
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: 2276
Location: @my desk

PostPosted: Fri Aug 07, 2009 2:28 pm    Post subject:
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    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 How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
This topic is locked: you cannot edit posts or make replies. SORT trick needed bshkris SYNCSORT 6 Tue May 02, 2017 4:35 am


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