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 for the CSV file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
naveensrimf

New User


Joined: 04 Oct 2005
Posts: 31

PostPosted: Fri Aug 02, 2013 10:01 pm    Post subject: Sort card required for the CSV file
Reply with quote

My input file CSV file is as below

Code:
Input  (<Client Number>.<Order Number>
-----------------------------------------------
123456789123.0
123456789143.712346789
123457.0
123456890.123456789
67456.123456789
456789123.134567891


My Output file
-------------
Code:
Clinet Number(20 Bytes)  Order number (9 Bytes)
----------------------------   ----------------------------

123456789123               000000000
123456789143               712346789
123457                          000000000
123456890                     123456789
67456                            123456789
456789123                     134567891


I need sort card for this by using parse.

Code'd
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Fri Aug 02, 2013 10:45 pm    Post subject: Reply to: Sort card required for the CSV file
Reply with quote

Can you show what you have tried and the problem you encountered? The Control Cards and the sysout from the step, please.
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Fri Aug 02, 2013 11:34 pm    Post subject:
Reply with quote

naveensrimf,


I believe the DOT you show in your input is actually a TAB character which is X'05' ,so you need to use parse with ENDBEFR=X'05' and it should be a walk in the park after that.
Back to top
View user's profile Send private message
mistah kurtz

Active User


Joined: 28 Jan 2012
Posts: 283
Location: Room: TREE(3). Hilbert's Hotel

PostPosted: Mon Aug 05, 2013 11:20 am    Post subject:
Reply with quote

You can check the HEX VALUE of the delimiter and use parse with ENDBEFR..whether it's a period or tab..

You can use the below sort card to achieve that:

SORT Job:
Code:
//STEP01   EXEC PGM=SORT                   
//SORTIN   DD *                             
123456789123 0                             
123456789143 712346789                     
123457 0                                   
123456890 123456789                         
67456 123456789                             
456789123 134567891                         
//SORTOUT  DD SYSOUT=*                     
//SYSOUT   DD SYSOUT=*                     
//SYSIN    DD *                             
 OPTION COPY                               
 INREC PARSE=(%00=(ENDBEFR=X'05',FIXLEN=20),
              %01=(FIXLEN=09)),             
 BUILD=(%00,%01)                       
/*                                         


Output:
Code:
----+----1----+----2----+----
*****************************
123456789123        0       
123456789143        712346789
123457              0       
123456890           123456789
67456               123456789
456789123           134567891
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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am


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