Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

sort card required

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: sort card required
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 Moderator


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

PostPosted: Mon Jan 04, 2010 10:58 pm    Post subject:
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    Post subject:
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: 1187
Location: Bangalore,India

PostPosted: Tue Jan 05, 2010 4:53 pm    Post subject:
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 Moderator


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

PostPosted: Tue Jan 05, 2010 10:56 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. SORT trick needed bshkris SYNCSORT 6 Tue May 02, 2017 4:35 am
No new posts SORT JSON type of data maxsubrat DFSORT/ICETOOL 8 Wed Apr 19, 2017 6:01 pm
No new posts Sort Large record length cmsmoon DFSORT/ICETOOL 14 Tue Apr 11, 2017 5:49 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us