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

Why the sequence number was generated when I use OUTREC


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
henry_he01

New User


Joined: 14 May 2009
Posts: 9
Location: China

PostPosted: Fri May 15, 2009 7:54 am
Reply with quote

Please refer the codes below:
Code:

//STEP0010 EXEC PGM=SORT                     
//SORTIN   DD DSN=TSO559B.FC9000.TEST,DISP=SHR
//SYSIN    DD *                               
 SORT FIELDS=(01,27,CH,A)                     
 OUTREC FIELDS=(1:1,27)                       
 END                                         
/*                                           
//SORTOUT  DD DSN=TSO559B.FC9000.ACCOUNT,     
//            DISP=(NEW,CATLG,CATLG),         
//            SPACE=(27,(50,10),RLSE),       
//            AVGREC=K,LRECL=27               
//SYSOUT   DD  SYSOUT=*                       
//SYSPRINT DD  SYSOUT=*                       
//SYSUDUMP DD  SYSOUT=*                       
//                                           

The input length is 37, and the job will cut the last 10 digits. So the output length is 27. But the last 6 digits in output file became to sequence number so that I can't modify it unless change the profile parameter.

Please refer the input file and output file below:
Input File:
Code:

=COLS> ----+----1----+----2----+----3----+--
****** ***************************** Top of
000001 002000000000000001010167508S-6265-5 
000002 002000000000000001010168250S-6265-5 
000003 002000000000000001010169673S-6265-5 
000004 002000000000000001010170298S-6265-5 
000005 002000000000000001010170921S-6265-5 


Output File:
Code:

=COLS> ----+----1----+----2----+--
****** ***************************
167508 002000000000000001010167508
168250 002000000000000001010168250
169673 002000000000000001010169673
170298 002000000000000001010170298
170921 002000000000000001010170921


Is there anyone could tell me why and any help will be appreciated.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Fri May 15, 2009 8:34 am
Reply with quote

when you edit the output file just type "NUM OFF" on the edit command line and press enter.
Back to top
View user's profile Send private message
henry_he01

New User


Joined: 14 May 2009
Posts: 9
Location: China

PostPosted: Fri May 15, 2009 8:44 am
Reply with quote

Thanks, Craq.
I know it, but why the profile of the new output file has been changed to NUMBER ON status. How can I do for keep the profile of output file can be same with input file.

In actually, if I change the length of output file from 27 to 26, the sequence number will not be generated.

Why? icon_sad.gif
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Substring number between 2 characters... DFSORT/ICETOOL 2
No new posts Generate random number from range of ... COBOL Programming 3
No new posts Increase the number of columns in the... IBM Tools 3
No new posts Cobol program with sequence number ra... COBOL Programming 5
Search our Forums:

Back to Top