MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problem using SORT - OUTREC statement

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
Anand_R
Intermediate


Joined: 24 Dec 2002
Posts: 189
Topics: 60

PostPosted: Fri Apr 20, 2007 2:52 pm    Post subject: Problem using SORT - OUTREC statement Reply with quote

Hi,

I have a dataset, which is 2741 lenght and I want to copy all the records but only lenght of 2712. I have used the following job to do that, but when records were copied the output is having lenght of 2712 but the data was not good. Original file (2741 lenght) have all types of fields, comp-3, character, comp-1 etc.. Can someone help me with this problem. Here is my job. Did I miss anything in sysin??

Code:

//STEP0005 EXEC PGM=SORT                                               
//SORTIN   DD DSN=BX36RF.XR6.SBQ.PFMAEXT.CAO.TAPEOA.M07UAT1.LA,DISP=SHR
//SORTOUT  DD DSN=BX36RF.XR6.SBQ.PFMAEXT.CAO.TAPEOA.M07UAT.LAB,         
//            UNIT=DASD,RETPD=40,DISP=(NEW,CATLG),                     
//            RECFM=FB,LRECL=2712,BLKSIZE=0,AVGREC=M,                   
//            SPACE=(CYL,(30,40),RLSE)                                 
//SYSOUT   DD SYSOUT=*                                                 
//SYSIN    DD  *                                                       
  SORT FIELDS=COPY                                                     
  OUTREC FIELDS=(1,2712)                                               
/*     


Thanks for your help
anand
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Fri Apr 20, 2007 4:46 pm    Post subject: Reply with quote

Quote:
but when records were copied the output is having lenght of 2712 but the data was not good. Original file (2741 lenght) have all types of fields, comp-3, character, comp-1 etc..


For this job, DFSORT copies input positions 1-2712 to output position 1-2712 without any changes. Whatever you had in the first 2712 bytes for input will be placed in the first 2712 bytes for output. I don't know what you mean by "data was not good". The output data will be the same as the input data. For this job, DFSORT doesn't care what type of fields are in the input records - it just treats them as bits.

You're going to have to clarify what you mean by "data was not good", and show the //SYSOUT messages, and how the output data is different from the input data, before anyone can help you.
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
vkphani
Intermediate


Joined: 05 Sep 2003
Posts: 483
Topics: 48

PostPosted: Mon Apr 23, 2007 4:12 am    Post subject: Reply with quote

Anand,

Show us the sample input and output data.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group