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 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: 33

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: 7314

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: 310
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 Will this code extract 1 byte from fi... pkmurali CLIST & REXX 8 Sat Nov 10, 2018 11:13 pm
No new posts Mainframe + Card domain exp. req. 5-6... capricorn Mainframe Jobs 0 Wed Oct 24, 2018 5:10 pm
No new posts Error reading file in REXX module ashek15 CLIST & REXX 3 Wed Oct 24, 2018 4:50 am
No new posts Convert VB file to FB plus special fo... cz016m SYNCSORT 15 Fri Oct 19, 2018 7:26 pm
No new posts Picking up the latest PS file pema_yozer JCL & VSAM 8 Thu Oct 11, 2018 12:26 pm

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