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

Comparing Signed Packed decimal and packed decimal

IBM Mainframe Forums -> SYNCSORT
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Virendra Shambharkar

New User

Joined: 26 Aug 2015
Posts: 55
Location: India

PostPosted: Wed Nov 14, 2018 9:37 am
Reply with quote


We are trying to compare same field having same values across 2 different files as follows

1. File 1- defined as 4/P ( COMP-3 PIC 9(7))
2. File 2 - defined as 4/PS ( COMP-3 PIC S9(7))

but we are getting incorrect results while comparing. Can you please advise what should be a correct sort card for comparing this.

Back to top
View user's profile Send private message

Global Moderator

Joined: 14 Mar 2007
Posts: 8794
Location: Welsh Wales

PostPosted: Wed Nov 14, 2018 12:32 pm
Reply with quote

Unfortunately, psychic day was Monday this week .............. so

Define "incorrect results"

What sort card have YOU tried, please post your code, the expected results and the actual results.
And ... Don't forget to use the code tags

Don't forget any of the other base information needed, the release level of your sort product, the RECFM & LRECL of your input / output datasets, field positions, lengths and data formats.
What exactly should happen for a field match and what happens for a mismatch.

Without any useful information, or in this case - any information - how can you possibly expect any useful information back icon_evil.gif
Back to top
View user's profile Send private message

Active Member

Joined: 29 Apr 2008
Posts: 934
Location: Maryland

PostPosted: Thu Nov 15, 2018 6:46 pm
Reply with quote

1) COMP-3 in IBM COBOL is always compiled to machine-supported signed decimal packed.
2) if you need any meaninful advice, then please, provide any meaningful info: what exactly you tried to do, and what exactly is incorrect??
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 -> SYNCSORT


Similar Topics
Topic Forum Replies
No new posts HOW TO OVERLAY A Packed decimal VALUE... DFSORT/ICETOOL 5
This topic is locked: you cannot edit posts or make replies. Assembler - Packed Decimals - PACK in... PL/I & Assembler 3
No new posts To convert numeric to Packed Decimal DFSORT/ICETOOL 9
No new posts Signed Count in Trailer SYNCSORT 7
No new posts Convert a packed decimal value to zon... DB2 6
Search our Forums:

Back to Top