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

adding right justified fields through SORT


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

New User


Joined: 13 Feb 2007
Posts: 54
Location: Pune India

PostPosted: Mon Oct 08, 2007 3:07 pm
Reply with quote

hi
i have two records in which the second field was RIGHT JUSTIFIED in the program that generated the records.for eg:
Code:
TOTAL MEETINGS:          ;                    36;
TOTAL MEETINGS:          ;                    37;


I added them using the sort step

Code:

   SORT FIELDS=(01,14,CH,A)
   SUM FIELDS=(27,22,ZD)   


but my output was
Code:
TOTAL MEETINGS:          ;0000000000000000000073;


can i get my output like the one below??

Code:

TOTAL MEETINGS:          ;                    73;


can i do this by making changes in the sortstep??
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Mon Oct 08, 2007 3:13 pm
Reply with quote

Have you looked at the "edit masks"?
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Mon Oct 08, 2007 4:42 pm
Reply with quote

As suggested take a look at the EDIT MASKS. Use the below code

Code:
OUTREC OVERLAY=(27:27,22,ZD,EDIT=(IIIIIIIIIIIIIIIIIIIITT))



Output:

Code:
TOTAL MEETINGS:          ;                    73;
Back to top
View user's profile Send private message
rohitcognizant

New User


Joined: 13 Feb 2007
Posts: 54
Location: Pune India

PostPosted: Mon Oct 08, 2007 5:21 pm
Reply with quote

NO BUT HOW CAN I GIVE EDITMASKS IN ASORTCARD??
If im right edit masks are used in programs is it???It removes leading zeroes right?
Back to top
View user's profile Send private message
rohitcognizant

New User


Joined: 13 Feb 2007
Posts: 54
Location: Pune India

PostPosted: Mon Oct 08, 2007 5:22 pm
Reply with quote

ok so let me give it a try
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Mon Oct 08, 2007 5:39 pm
Reply with quote

Quote:
I added them using the sort step


This indicates you have used a JCL

Quote:
NO BUT HOW CAN I GIVE EDITMASKS IN ASORTCARD??


Just add the OUTREC OVERLAY statement after SUM FIELDS.

Quote:
If im right edit masks are used in programs is it???It removes leading zeroes right?


They are used in the JCL SORT cards. There are many edit masks available and please check the manual to know more.
Back to top
View user's profile Send private message
rohitcognizant

New User


Joined: 13 Feb 2007
Posts: 54
Location: Pune India

PostPosted: Mon Oct 08, 2007 7:47 pm
Reply with quote

OK THAT WORKED
THANKS AARU
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: Mon Oct 08, 2007 9:44 pm
Reply with quote

Actually, the EDIT mask should be:

EDIT=(IIIIIIIIIIIIIIIIIIIIIT)

All I's and then one T.

But an easier way to do it is to use M10,LENGTH=22. So the DFSORT control statements would be:

Code:

  SORT FIELDS=(01,14,CH,A)
  SUM FIELDS=(27,22,ZD)
  OUTREC OVERLAY=(27:27,22,ZD,M10,LENGTH=22)
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Tue Oct 09, 2007 10:56 am
Reply with quote

Frank,

Thanks for the details.

Rohit,

M10 is nothing but an EDIT MASK which has the patteren as mentioned in frank's post.

Please go through the DFSORT manual to know more about these EDIT MASKS.
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 Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Adding QMF and SPUFI to the ISPF menu DB2 20
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top