Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
adding right justified fields through SORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
rohitcognizant

New User


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

PostPosted: Mon Oct 08, 2007 3:07 pm    Post subject: adding right justified fields through SORT
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: 2150
Location: At my coffee table

PostPosted: Mon Oct 08, 2007 3:13 pm    Post subject:
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: 1288
Location: Chennai, India

PostPosted: Mon Oct 08, 2007 4:42 pm    Post subject: Reply to: adding right justified fields through SORT
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: 55
Location: Pune India

PostPosted: Mon Oct 08, 2007 5:21 pm    Post subject:
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: 55
Location: Pune India

PostPosted: Mon Oct 08, 2007 5:22 pm    Post subject:
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: 1288
Location: Chennai, India

PostPosted: Mon Oct 08, 2007 5:39 pm    Post subject: Reply to: adding right justified fields through SORT
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: 55
Location: Pune India

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

OK THAT WORKED
THANKS AARU
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: Mon Oct 08, 2007 9:44 pm    Post subject:
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: 1288
Location: Chennai, India

PostPosted: Tue Oct 09, 2007 10:56 am    Post subject: Reply to: adding right justified fields through SORT
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    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 Merging 2 records at multiple rows wi... Bijesh DFSORT/ICETOOL 2 Wed Dec 06, 2017 1:50 am
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm
No new posts JOINKEYS Paired and Unpaired Sort on ... MFwhiz DFSORT/ICETOOL 7 Tue Nov 07, 2017 2:46 am
No new posts Subtract the ZD fields to provide neg... Balaryan DFSORT/ICETOOL 4 Wed Oct 11, 2017 10:51 pm
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us