IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

After sorting a PD field, the output is not in the same PD


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
srsathish

New User


Joined: 20 Feb 2007
Posts: 6
Location: Westborough, MA

PostPosted: Fri Jul 15, 2011 1:50 am
Reply with quote

Hi,

I'm trying to do a sort on one field, where as the o/p file should have two fields. (Sorted field and another S9(7)v99)

1. First a PD (S9(7) comp-3), and the o/p is not in PD, also there is leading spaces if the input has less than 7 digits.

2. Second field ($) is an S9(7)v99 starting from 50th position. And this will have negative values too.

SORT card used

SORT FIELDS=(13,4,PD,A),SKIPREC=1
OUTREC FIELDS=(1:13,4,PD,
9:50,9,ZD)

The problem is for both of the fields, there are leading spaces for records less than 7 digits. This is creating problem in the subsequent steps.

O/p file looks like as in the attachment.

Is there a way to eliminate the leading spaces?
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Fri Jul 15, 2011 2:10 am
Reply with quote

It's not clear at all what you're trying to do. You're using the default edit mask of M0 which is probably not what you want. All you show is the output you received. That doesn't tell us what output you actually want.

You need to show an example of your input and what you expect for output. Explain the rules for getting from input to output. Give the RECFM and LRECL of the input file.

DO NOT post downloads and/or screenshots. Just show the text with code tags around it.

Also, please run this job and show us the //SYSOUT messages so we can see what level you're at:

Code:

//S1    EXEC  PGM=SORT             
//SYSOUT    DD  SYSOUT=*           
//SORTIN DD *                     
RECORD                             
//SORTOUT DD DUMMY                 
//SYSIN    DD    *                 
    OPTION COPY                   
/*                                 
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
This topic is locked: you cannot edit posts or make replies. Automation need help in sorting the data DFSORT/ICETOOL 38
No new posts Joinkeys - 5 output files DFSORT/ICETOOL 7
Search our Forums:

Back to Top