MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Reg the amount fields which are in Overpunch format

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
srini_igsi
Beginner


Joined: 12 May 2006
Posts: 41
Topics: 16
Location: Mumbai

PostPosted: Thu Nov 02, 2006 7:13 am    Post subject: Reg the amount fields which are in Overpunch format Reply with quote

Hi,

We receive a file from the client with the amount fields in 'Overpunch' fomat on it. The file has a HDR, Multiple DTL(s) and a TRL record on it. For all the DTL records, an amount field which starts at 70th position and is of length 11 chars have to be summed up and this accumulated amount should be written to an out file with only one record. Here the question is about handling the amounts which are in 'Overpunch' format in DF Sort.

Ex:
0000001770A
0000028268D
0000003218A
0000000173F

The actual 'A' value is +1 - so the exact value will be '+00000017701' ... D - +4 .... etc.

Can somebody help me out to sum up these values using DF Sort.
_________________
Thanks,
-Srini
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12372
Topics: 75
Location: San Jose

PostPosted: Thu Nov 02, 2006 7:48 am    Post subject: Reply with quote

srini_igsi,

you need to use the option ZDPRINT .I assumed that your DTL records are identified by DTL in the first 3 bytes.

Try this
Code:

//SYSIN  DD   *         
 INCLUDE COND=(1,3,CH,EQ,C'DTL')
 OPTION ZDPRINT         
 SORT FIELDS=(1,3,CH,A)
 SUM FIELDS=(70,11,ZD)
/*


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
srini_igsi
Beginner


Joined: 12 May 2006
Posts: 41
Topics: 16
Location: Mumbai

PostPosted: Fri Nov 03, 2006 3:19 am    Post subject: Reply with quote

Hi,

Thanks, it's working fine. Could you pl explain me a little bit abt OPTION ZDPRINT.
_________________
Thanks,
-Srini
Back to top
View user's profile Send private message
shekar123
Advanced


Joined: 22 Jul 2005
Posts: 528
Topics: 90
Location: Bangalore India

PostPosted: Fri Nov 03, 2006 7:16 am    Post subject: Reply with quote

Srini_igsi,

Check this link:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA10/10.5.2?DT=20050222160456
_________________
Shekar
Grow Technically
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Fri Nov 03, 2006 11:33 am    Post subject: Reply with quote

ZDPRINT tells DFSORT to use an F sign rather than a C sign for summed positive ZD fields. So a summed value of 123 would be X'F1F2F3' which prints/displays as '123' rather than X'F1F2C3' which prints/displays as '12C'. Thus, with ZDPRINT, the positive summed ZD values are printable/displayable.
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
srini_igsi
Beginner


Joined: 12 May 2006
Posts: 41
Topics: 16
Location: Mumbai

PostPosted: Mon Nov 20, 2006 8:34 am    Post subject: Reply with quote

The same 'ZDPRINT' can also convert the negative overpunched chars like for the positive overpunched ... right?

Pl correct me if i am wrong.
_________________
Thanks,
-Srini
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Mon Nov 20, 2006 11:30 am    Post subject: Reply with quote

Quote:
The same 'ZDPRINT' can also convert the negative overpunched chars like for the positive overpunched ... right?

Pl correct me if i am wrong.


No. ZDPRINT only changes positive values (C sign to F sign) to make them printable. It does not change negative values (D sign) - if it changed a D sign to an F sign, the value would be printable but would no longer be negative.

Tell us exactly what it is you want the output values to look like for positive and negative input values and we'll show you how to do it.
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group