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
 

 

PRb WITH DISPLAYING

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
shaikfayaz

New User


Joined: 26 Nov 2008
Posts: 9
Location: Hyderabad

PostPosted: Mon Dec 08, 2008 3:15 pm    Post subject: PRb WITH DISPLAYING
Reply with quote

Hi, I am writing a report from a file which is received from Client. Following are steps

1. I will read the total number of records in the input file and stores in a variable.
2. once the value is count value is ready i will compare the value which is received in the input file(sent by Client). But the problem i have is i took the FIXED BIN(63,0) total of 8 characters and from client side i am receiving it as Fixed dec(16,0)..

Code is :

IF TOT_REC_CNT = TRAILER_DATA_REC.REC_CNT THEN
PUT SKIP LIST('*******TRAILER RECORD COUNT IS MATCHED************');

where TOT_REC_CNT = FIXED BIN(63,0)
REC_CNT = Fixed Dec(16,0)

i am writing report as

BUP_REC_CNT = TRAILER_DATA_REC.REC_CNT;
where BUP_REC_CNT PIC '$$,$$$,$$$,$$$,$$9V.99+'. Please get back to me if the question is not clear.

but it is saying data exception error..
Back to top
View user's profile Send private message

Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 992
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Mon Dec 08, 2008 6:46 pm    Post subject:
Reply with quote

From our description, the problem would appear to be with the fields in BUP_REC_CNT = TRAILER_DATA_REC.REC_CNT;

The TOT_REC_CNT attributes are irrelevant - you are only using this internally to the program.

TRAILER_DATA_REC.REC_CNT will occupy 8 bytes and can contain up to 17 digits. Your PIC field should allow for this extra digit - you only have allowed for 16 digits. You also need to check that the input field is containing 8 bytes of valid packed data.

Garry.
Back to top
View user's profile Send private message
shaikfayaz

New User


Joined: 26 Nov 2008
Posts: 9
Location: Hyderabad

PostPosted: Mon Dec 08, 2008 6:55 pm    Post subject:
Reply with quote

Yes.. The input data(16 digits, 8 byte) is valid one which holds the record count of the file.. for example if the input file have 7719 records the count will be displayed as

Code:
      Éæ
00000079
0000071C

once i count the total records in the input file surely i will get the count as same 7719 i wanns show to them that both is matched file received with out any erros..
Back to top
View user's profile Send private message
shaikfayaz

New User


Joined: 26 Nov 2008
Posts: 9
Location: Hyderabad

PostPosted: Mon Dec 08, 2008 6:57 pm    Post subject:
Reply with quote

How can i compare the binary and decimal values(TOT_REC_CNT, REC_CNT) and then pass this success or failre info to another variable ??
Back to top
View user's profile Send private message
Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 992
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Mon Dec 08, 2008 7:19 pm    Post subject:
Reply with quote

It should be possible to just compare and set the other variable accordingly.
e.g.

Code:
IF TOT_REC_CNT = TRAILER_DATA_REC.REC_CNT THEN
  other_variable = 'matched'
  else other_variable = 'unmatched'


This IF instruction should not be getting data exception.

You didn't say which instruction was getting the data exception. Also, be aware that if the data exception is happening on the assignment to PIC, the PUT SKIP LIST data may be in buffer and therefore not visible in output as a result of the abend.

If still having problems, please post more of your code , using the 'code' tags.

Garry.
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 -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts XML generated from cobol is displayin... vangeti COBOL Programming 2 Wed Aug 19, 2015 5:16 pm
No new posts Displaying records per contract and a... madishpa DFSORT/ICETOOL 2 Mon Feb 16, 2015 7:39 pm
No new posts Displaying the value set by the EXIT ... Ricardo Viegas CLIST & REXX 12 Tue Dec 03, 2013 5:17 am
No new posts File Manager for CICS - Rec count not... Div Grad IBM Tools 0 Thu Nov 28, 2013 12:04 am
No new posts ERROR in Displaying the Sample Panel ... Ramsee CLIST & REXX 4 Tue Nov 12, 2013 7:04 pm


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