Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm
No new posts JOINKEYS Paired and Unpaired Sort on ... MFwhiz DFSORT/ICETOOL 7 Tue Nov 07, 2017 2:46 am
This topic is locked: you cannot edit posts or make replies. Need help how to pass the ESP variabl... Venkichaitu JCL & VSAM 12 Thu Nov 02, 2017 3:53 am
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts JOINKEYS Paired and Unpaired Sort MFwhiz DFSORT/ICETOOL 4 Fri Sep 29, 2017 1:48 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us