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

need a column of a large file to put in a new file


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

New User


Joined: 16 May 2008
Posts: 36
Location: Kolkata,India

PostPosted: Wed Feb 10, 2010 1:59 pm
Reply with quote

Hi,

I need to put a particular column of an I/P file to a new file (from 201th column of length 6 )
I am using the below SYSIN for the sort card but getting an error.

Code:
//SYSIN DD *             
  SORT FIELDS=COPY       
  OUTREC FIELDS=(1:201,6)
/*                       


error
Code:
WER235A  INREC    RDW NOT INCLUDED
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Wed Feb 10, 2010 2:03 pm
Reply with quote

1) This is SYNCSORT so should be posted in the JCL forum.

2) The error message tells you exactly what the problem is. Have you bothered to read the product documentation for yourself.
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 496
Location: USA

PostPosted: Thu Feb 18, 2010 1:04 am
Reply with quote

Kamlesh,

Assuming your original input file was variable length and you want a variable length output file, then you can code the following:
Code:
//SYSIN DD *             
  INREC FIELDS=(1,4,5:201,6)
  SORT FIELDS=COPY       
/*         

However, if you want a fixed-length output file, then you can code this instead:
Code:
//SYSIN DD *   
  SORT FIELDS=COPY       
  OUTREC FIELDS=(201,6),CONVERT
/*         

or
Code:
//SYSIN DD *   
  SORT FIELDS=COPY       
  OUTREC FIELDS=(201,6),VTOF
/*         
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 FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
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 Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top