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
 

 

How to reformat the fields to nominated format!

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
SCANDY

New User


Joined: 08 Aug 2007
Posts: 10
Location: Dalian, China

PostPosted: Tue Aug 14, 2007 4:10 pm    Post subject: How to reformat the fields to nominated format!
Reply with quote

Hi, everyone,
I want to reformat signed numeric data to fixed length, with sign to the first field, and the following data right-justified.
Here is the example, source data as following:
Code:
-555555
444235
-55656
96542
+9936

Expected result:
Code:
-  555555
+  444235
-   55656
+   96542
+    9936

How to make it, Thanks!
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 Aug 14, 2007 8:34 pm    Post subject:
Reply with quote

Here's a DFSORT job that will do what you asked for:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD *
-555555
444235
-55656
96542
+9936
/*
//SORTOUT DD SYSOUT=*
//SYSIN    DD    *
  OPTION COPY
  INREC OVERLAY=(1:1,8,SFF,M26,LENGTH=9,
                 2:2,8,FS,EDIT=(IIIIIIIT))
/*
Back to top
View user's profile Send private message
SCANDY

New User


Joined: 08 Aug 2007
Posts: 10
Location: Dalian, China

PostPosted: Wed Aug 15, 2007 8:55 am    Post subject:
Reply with quote

Great! Thanks!
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies.    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 Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
No new posts Access SQLCA fields inside a stored p... gangapd DB2 4 Thu Oct 27, 2016 10:20 am
No new posts Low values Results from VARCHAR FORMAT balaji81_k DB2 10 Thu Oct 20, 2016 1:18 am
No new posts output data in CSV Format janmejay COBOL Programming 8 Sat Oct 15, 2016 2:20 pm


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