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

sort card required


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

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Mon Jan 04, 2010 9:30 pm
Reply with quote

I have 2 columns in the file and want to seperate the two columns with a space using the DFSORT.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Mon Jan 04, 2010 10:58 pm
Reply with quote

You need to provide more information (your use of the term "columns" is amibiguous).

Please show an example of the records in the input file (relevant fields only) and what you expect for output. Explain the "rules" for getting from input to output. Give the starting position, length and format of each relevant field. Give the RECFM and LRECL of the input file.
Back to top
View user's profile Send private message
mkk157

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Tue Jan 05, 2010 4:29 pm
Reply with quote

Frank,

Below are the Example records.

Code:
Input File

4501989762520021
1243875415450033
4201384242520022
3456789162520012

Output File:

450198976252 0021
124387541545 0033
420138424252 0022
345678916252 0012
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Tue Jan 05, 2010 4:53 pm
Reply with quote

Hello M KK,

Please use below sortcard depending upon ur inputs

Code:
  OPTION COPY               
  OUTREC FIELDS=(1,12,X,13,4)
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue Jan 05, 2010 10:56 pm
Reply with quote

If your input file has RECFM=FB and you want the output file to have RECFM=FB and LRECL=n where n > 26, you can use a DFSORT job like the following:

Code:

//S1   EXEC PGM=SORT       
//SYSOUT DD SYSOUT=*                       
//SORTIN   DD  DSN=...  input file                                   
//SORTOUT  DD  DSN=...  output file             
//SYSIN    DD   *                                     
  OPTION COPY                                         
  OUTREC FIELDS=(1,12,X,13,4,n:X)         
/*


So if you want output LRECL=80, you would use 80:X.

If you want output LRECL=26, use:

Code:

   OUTREC FIELDS=(1,12,X,13,4)
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 How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
No new posts how to calculate SUM for VB file usin... JCL & VSAM 1
Search our Forums:

Back to Top