View previous topic :: View next topic
|
Author |
Message |
rohitcognizant
New User
Joined: 13 Feb 2007 Posts: 54 Location: Pune India
|
|
|
|
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 |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
Have you looked at the "edit masks"? |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
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 |
|
|
rohitcognizant
New User
Joined: 13 Feb 2007 Posts: 54 Location: Pune India
|
|
|
|
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 |
|
|
rohitcognizant
New User
Joined: 13 Feb 2007 Posts: 54 Location: Pune India
|
|
|
|
ok so let me give it a try |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
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 |
|
|
rohitcognizant
New User
Joined: 13 Feb 2007 Posts: 54 Location: Pune India
|
|
|
|
OK THAT WORKED
THANKS AARU |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
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 |
|
|
|