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

Question on Syncsort OUTREC option


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
janmejay
Warnings : 1

New User


Joined: 22 Jun 2007
Posts: 85
Location: bangalore

PostPosted: Tue Jul 29, 2008 10:50 am
Reply with quote

I have an input file with record length of 600. In the output file I want , only the coln position 1-2 should be skipped and the remaining fields should be copied.
By using outrec we can do this , but in this case we need to specify every fields that to be come in the output file .
is it possible only the coln posn 1-2 is skipped and remaining should copied to output file by using outrec.
i tried outrec=(1:3,600)

but its showing error 'OUTREC FIELD OUTSIDE RANGE'
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Tue Jul 29, 2008 11:02 am
Reply with quote

Try the below sort card,
Code:
 outrec=(1:3,600,2X)


i have padded 2 blanks at the end of each record to compensate the record length to be 600 after removing column 1-2.

If you are still facing problems the post your sysout messages
Back to top
View user's profile Send private message
Prasanthhere

Active User


Joined: 03 Aug 2005
Posts: 306

PostPosted: Tue Jul 29, 2008 11:06 am
Reply with quote

When you are skipping 2 fields the output file will be 598 ie, you are getting an error .

OUTREC FIELDS=(1:3,598) will work fine. If you need the o/p file as 600 itself you have pad the 2 extra spaces
Back to top
View user's profile Send private message
janmejay
Warnings : 1

New User


Joined: 22 Jun 2007
Posts: 85
Location: bangalore

PostPosted: Tue Jul 29, 2008 11:32 am
Reply with quote

OUTREC=(1:3,600,2X) its also showing same error.
OUTREC=(1:3,598) its working fine.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Tue Jul 29, 2008 11:49 am
Reply with quote

Isn't the syntax (1:pos,length,......)

Which means that there will be an error using 3,600 for a 600 byte records, as there can not be 600 bytes of record left from pos 3 onwards.
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Tue Jul 29, 2008 12:21 pm
Reply with quote

yes, expat that's true
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 Compare only first records of the fil... SYNCSORT 7
No new posts SCOPE PENDING option -check data DB2 2
No new posts OUTFIL with SAVE option DFSORT/ICETOOL 7
No new posts CICS vs LE: STORAGE option CICS 0
No new posts Question for file manager IBM Tools 7
Search our Forums:

Back to Top