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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: After sorting a PD field, the output is not in the same PD
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 Moderator


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

PostPosted: Fri Jul 15, 2011 2:10 am    Post subject:
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    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 Sorting of hex values Saurabh_mi DFSORT/ICETOOL 10 Thu May 25, 2017 3:49 pm
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts Alter &DATENS field in HEADER1 Angad DFSORT/ICETOOL 4 Mon Apr 24, 2017 11:49 am
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm


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