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
 

 

SOC7 abend while SUMming up ZD fields usinf ICETOOL

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

New User


Joined: 27 Nov 2006
Posts: 8
Location: Bangalore

PostPosted: Fri Sep 18, 2009 10:19 pm    Post subject: SOC7 abend while SUMming up ZD fields usinf ICETOOL
Reply with quote

Hi Forum Members/Moderators,

1) I have been receiving SOC7 abend while adding up the ZD field values. It contains both +ve and -ve signs in it. I aslo tried to strip off the sign and then add. It was successful but additional without sign would be incorrect. The SUM has to be done based on REC 35,11,CH from IN file.

2) I also have the requirement to reverse the sign of the resulting field, as in MUL by -1. I have tried varius sort cards but the actual result seems to either vary or error out. Pls advice

Input field eg:
size-17
contents:
-+----6----+----7
+0000000000002816
+0000000000005156
+0000000000003084
+0000000000003741
+0000000000001131
-0000000000001058
-0000000000003263
-0000000000002409
-0000000000003315
-0000000000003803
Defined as ZD in my sort card:

//SYMNAMES DD *
*DETAIL
AMOUNT,154,17,ZD

/CPY1CNTL DD *
SORT FIELDS=(RECKEY,A)
OPTION ZDPRINT
SUM FIELDS=(AMOUNT)
OUTREC BUILD=(1,153,
AMOUNT,MUL,-1,
C'DATA FIELD',4X,
186,894)
AMOUNT,154,17,ZD

How can i SUM up the fields to receive a REVERSED sign value which actually corresponds to the input. Questions welcome.pls advice

Regards,Saurabh

P.S--> the abend
SYSTEM COMPLETION CODE=0C7 REASON CODE=00000000
TIME=15.49.32 SEQ=53355 CPU=0000 ASID=00DB
PSW AT TIME OF ERROR 078D2000 8000BE1C ILC 6 INTC 07 [/code]
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 Sep 18, 2009 10:39 pm    Post subject:
Reply with quote

You can't use ZD format for +ve and -ve values. You can use FS format, but you can't use FS format in SUM. So you need to convert the values from FS format to ZD format and then SUM on the ZD values. You can use a DFSORT job like the following to do what you asked for. I assumed your input file has RECFM=FB and LRECL=1100, but you can change the job appropriately for other attributes.

Code:

//S1    EXEC  PGM=ICETOOL
//SYMNAMES DD *
*DETAIL
AMOUNT,154,17,FS
ZDAMT,1101,16,ZD
RECKEY,...           ?????
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=...  input file (FB/1100)
//OUT DD DSN=...  output file (FB/1078)
//TOOLIN   DD    *
SORT FROM(IN) TO(OUT) USING(CPY1)
/*
//CPY1CNTL DD *
 INREC OVERLAY=(ZDAMT:AMOUNT,TO=ZD,LENGTH=16)
 SORT FIELDS=(RECKEY,A)
 OPTION ZDPRINT
 SUM FIELDS=(ZDAMT)
 OUTREC BUILD=(1,153,
               ZDAMT,MUL,-1,EDIT=(STTTTTTTTTTTTTTTT),SIGNS=(+,-),
               C'DATA FIELD',4X,
               186,894)
/*
Back to top
View user's profile Send private message
saurabh516

New User


Joined: 27 Nov 2006
Posts: 8
Location: Bangalore

PostPosted: Fri Sep 18, 2009 11:02 pm    Post subject:
Reply with quote

Hi Frank,
Thanks for the above solution. I modified the CPY1 card and submited the same but received the error:

Code:

ICE282I 0 PERFORMING SYMBOL SUBSTITUTION AS NEEDED         
           INREC OVERLAY=(ZDAMT:AMOUNT,TO=ZD,LENGTH=16)   
                          £                               
ICE283A 0 SYMBOL, SYNTAX OR DELIMITER ERROR               
           SUM FIELDS=(ZDAMT)                             
                       £                                   
ICE283A 0 SYMBOL, SYNTAX OR DELIMITER ERROR               


Pls advice.

Regards,Saurabh
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 Sep 18, 2009 11:22 pm    Post subject:
Reply with quote

You need to make the changes to SYMNAMES I show in my job:

Code:

//SYMNAMES DD *
*DETAIL
AMOUNT,154,17,FS
ZDAMT,1101,16,ZD


The £ under ZDAMT indicates that symbol was not found in SYMNAMES.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Sun Sep 20, 2009 8:02 pm    Post subject:
Reply with quote

Hi Frank,

I'm curious to know, here
Quote:
ZD format for +ze and -ze values
by +ze and -ze, did you mean positive and negative ZD values?
Back to top
View user's profile Send private message
saurabh516

New User


Joined: 27 Nov 2006
Posts: 8
Location: Bangalore

PostPosted: Mon Sep 21, 2009 2:03 pm    Post subject:
Reply with quote

Hey Frank, Thanks for the solution above. I received the desired result. Thanks,Saurabh
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 Sep 21, 2009 9:26 pm    Post subject:
Reply with quote

Quote:
I'm curious to know, here Quote:
ZD format for +ze and -ze values
by +ze and -ze, did you mean positive and negative ZD values?


That was a typo. I meant +ve and -ve as in the OP's first post meaning +n...n and -n...n values which are, of course, not valid ZD values.

I've corrected +ze and -ze to +ve and -ve in my post. Thanks for pointing this out.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1238
Location: Richfield, MN, USA

PostPosted: Mon Sep 21, 2009 9:53 pm    Post subject: Re: SOC7 abend while SUMming up ZD fields usinf ICETOOL
Reply with quote

saurabh516 wrote:
...It contains both +ve and -ve signs in it.

[rant on]Would it have been that much more inconvenient to spell out positive and negative?
[/rant off]
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 Sep 21, 2009 10:16 pm    Post subject:
Reply with quote

I've seen +ve and -ve used quite often. I suspect it's a notation from some particular language or convention, but I don't know for sure. Probably just a shorthand way of indicating what the values look like. Since the orginal post had examples of what the values look like, it seemed sufficient to me.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1238
Location: Richfield, MN, USA

PostPosted: Mon Sep 21, 2009 10:32 pm    Post subject:
Reply with quote

I agree that it was probably sufficient to know what the original poster meant, but what really irritates me is the amount of "chat speak" and site-specific abbreviations I see here. Information Technology usually requires very precise terminology and the use of these abbreviations oftentimes results in a lot of people wasting time doing a lot of guessing as to what the "real" question actually was.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Sep 22, 2009 1:13 pm    Post subject:
Reply with quote

Thanks Frank -- I was little unsure about that, so I asked away.

Probably I'd agree with Terry as I was confused with "+ze/-ze" because before your recent post I was under the inpression that they mean something.
Back to top
View user's profile Send private message
saurabh516

New User


Joined: 27 Nov 2006
Posts: 8
Location: Bangalore

PostPosted: Fri Oct 09, 2009 2:16 pm    Post subject: ICETOOL-Arrange records in file wrt to Date(in another file)
Reply with quote

Hi Frank,

Thanks for the previous solution.
I have additional reqmnt changes proposed, in addition to the icetool card above. I have to use JCL cards only for this process and not cobol source.
I am listing them below:

1. Read the DATE from date control IN1 file: at (70,8,CH)
Code:
********************************* Top of Data **********************************
HRINSIGHT                                                          03102009   
******************************** Bottom of Data


2.Compare the DATE(above) with DA1(from below file), arrange records accordingly, sort with Account code(pos 35,11,CH) SUM them up sequentially:
IN2 file format:

Code:
03102009GBP+0000000000004131ANS9004217212NU         
03102009GBP+0000000000004607ANS9004269192NU     
03102009GBP+0000000000002680ANS9004883012NU     
03102009GBP+0000000000002582ANS9004912432NU     
03102009GBP+0000000000003457ANS9005096342NU     
03102009GBP+0000000000002603ANS9005128802NU     
02102009GBP-000000000000486209035830862137       
02102009GBP-000000000000484809035831069643       
02102009GBP-000000000000404009035831124881       
02102009GBP-000000000000472009035832139718       
02102009GBP-000000000000283209035832478245       
02102009GBP-000000000000657809035832917338       
02102009GBP-000000000000177409035833605577       


Loaction of D2 135,8,CH
Loc of amount field(with sign) 154,17,CH

3. There can be instances where D2 can vary by +/- 5 days wrt to control DATE, so the no of records to be arranged and summed up can be dynamic.

4. Expected o/p file:

03102009GBP+0000000000012456ANS9004217212NU
02102009GBP-000000000000486209035830862137
01102009GBP-000000000000484809035831069643
xxxxxxxxxxxxxxxxxxxxxxxxxxx
30092009GBP-000000000000177409035833605577 [/code]

I need to also convert the amount ZD values to 15 bytes with 2 decimal places for which I used EDIT=(STTTTTTTTTTT.TT),thats fine. The earlier card which u had adviced was:

Code:
*DETAIL                                                             
RECKEY,35,11,CH                                                     
AMOUNT,154,17,FS                                                   
ZDAMT,1080,16,ZD                                                   
/*                                                                 
//TOOLIN   DD *                                                     
 SORT FROM(INPUT) TO(OUTPUT1) USING(CPY1)                           
 SORT FROM(INPUT) TO(OUTPUT2) USING(CPY2)                           
/*                                                                 
//CPY1CNTL DD *                                                     
  INREC OVERLAY=(ZDAMT:AMOUNT,TO=ZD,LENGTH=16)                     
  SORT FIELDS=(RECKEY,A)                                           
  OPTION ZDPRINT                                                   
  SUM FIELDS=(ZDAMT)                                               
  OUTREC BUILD=(1,153,                                             
                ZDAMT,MUL,-1,EDIT=(STTTTTTTTTTT.TT),SIGNS=(+,-),   
                C'GENERAL INS',4X,                                 
                186,894)                 


Pls advice, hope I have made myself clear


Best Regards,
Saurabh
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Fri Oct 09, 2009 9:56 pm    Post subject: Reply to: SOC7 abend while SUMming up ZD fields usinf ICETOO
Reply with quote

Saurabh516,


Quote:
3. There can be instances where D2 can vary by +/- 5 days wrt to control DATE, so the no of records to be arranged and summed up can be dynamic.


what is D2?

Is your intention to sum up only records which are matching with the date from date control file?

Does the date control file have current date or can it be any date?

Sort products do not have the ability of performing date arithmetic. So if you want to sum records within a range then you need a program for that. But if it is based off an offset from the current date then it can be done easily within sort itself
Back to top
View user's profile Send private message
saurabh516

New User


Joined: 27 Nov 2006
Posts: 8
Location: Bangalore

PostPosted: Mon Oct 12, 2009 2:14 pm    Post subject:
Reply with quote

Hi Skolusu,

Here are the answers:
* I referred D2 as the Date value in the Input file, which has to summed and arranged wrt date viz DATE in control

*Is your intention to sum up only records which are matching with the date from date control file? Yes but the SUM has to be done wrt to Amount ONLY.

*I have a limitation of using only DFSORT tools for this operation and not a program. Is there any way out?

Regards,
saurabh516
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1238
Location: Richfield, MN, USA

PostPosted: Mon Oct 12, 2009 8:41 pm    Post subject:
Reply with quote

wrt?? viz??
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 IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts Access SQLCA fields inside a stored p... gangapd DB2 4 Thu Oct 27, 2016 10:20 am
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm
No new posts ICETOOL/SYNCSORT - SYSPRINT output nartcr DFSORT/ICETOOL 17 Wed Oct 05, 2016 10:46 pm


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