srsathish
New User
Joined: 20 Feb 2007 Posts: 6 Location: Westborough, MA
|
|
|
|
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? |
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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
/*
|
|
|