IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

PRb WITH DISPLAYING


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
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
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

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Mon Dec 08, 2008 6:46 pm
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
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
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

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Mon Dec 08, 2008 7:19 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts IBM OnDemand Folders displaying to al... IBM Tools 6
No new posts Reg:Displaying the particular month o... All Other Mainframe Topics 4
No new posts XML generated from cobol is displayin... COBOL Programming 2
No new posts Displaying records per contract and a... DFSORT/ICETOOL 2
No new posts Displaying the value set by the EXIT ... CLIST & REXX 12
Search our Forums:

Back to Top