Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Initializing S9 COMP-3 while BMCUNLD

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
gauravgupta2808
Warnings : 1

New User


Joined: 31 May 2007
Posts: 31
Location: Chennai, India

PostPosted: Sat May 31, 2008 1:16 pm    Post subject: Initializing S9 COMP-3 while BMCUNLD
Reply with quote

Hi,

I have a copybook of the following layout:
Code:

01 :TAG:-TGDEBTP.       
  03 :TAG:-TGDEBTP-DATA.
    05 :TAG:-TGY6CE          PIC X(2).         
    05 :TAG:-TGY7CE          PIC X(1).         
    05 :TAG:-TGY8CE          PIC X(2).         
    05 :TAG:-TGJENC          PIC S9(5) COMP-3. 
    05 :TAG:-TGHFTT          PIC X(40).         
    05 :TAG:-TGHGTT         PIC X(40).         


Field TGJENC is not available in TGDEBTP table. I have to initialize it to zeroes while unloading.
My DB2 Unload Card is of type:
Code:

* CONTROL CARD   
UNLOAD           
DIRECT AUTO     
SELECT           
  TGY6CE,
  TGY7CE,
  TGY8CE,
  CHAR('00000'),
  TGHFTT,
  TGHGTT
FROM TGDEBTP;


By unloading using above data card, I am unable to get the expected layout as per copybook.
I have tried using CAST. that also didnt work

Could Some one please help me.


Thank you
Gaurav
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6970
Location: porcelain throne

PostPosted: Sat May 31, 2008 3:34 pm    Post subject:
Reply with quote

CHAR(X'000000000C')
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sat May 31, 2008 3:36 pm    Post subject:
Reply with quote

Hello,

You have used a "pic x(5)" value when you specified "CHAR('00000'),".

Try just using "00000," (wthout the quotes).
Back to top
View user's profile Send private message
gauravgupta2808
Warnings : 1

New User


Joined: 31 May 2007
Posts: 31
Location: Chennai, India

PostPosted: Sat May 31, 2008 6:13 pm    Post subject: My try
Reply with quote

Hi,

Just "00000" was not giving expected results.

Finally I have used,
CAST(CHAR(X'F0') AS DECIMAL(5,0))

This has hit performance, but its giving expected output even cases where I have to initialize S9(3)V9(2) COMP-3. fields

Thank you all for suggestions
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sat May 31, 2008 9:18 pm    Post subject:
Reply with quote

Hello,

Quote:
Just "00000" was not giving expected results.
What result was given?

Did you try the suggestion from dbz? When you try it, make sure to use the required number of zeros (as dbz did). An implied decimal should cause no problem.

Quote:
This has hit performance
How was this measured? It appears that the most costly way to do the job was chosen. If this is a one-time process, probably not an issue. If this is part of some regular run, and you can actually see a performance hit, it would probably one a good idea to change the process.
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 -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts COMP Variables Mismatch gayu7 COBOL Programming 5 Wed Dec 20, 2017 5:06 pm
No new posts Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 2 Thu Dec 14, 2017 5:46 pm
No new posts CONDITIONAL USING COMP-2 WITH PROBLEMS. JOSUEGENTIL COBOL Programming 7 Wed Nov 08, 2017 11:13 pm
No new posts how can i move s9(9) to s9(9) usage comp HARENDRA CHOUDHARY COBOL Programming 3 Mon Nov 06, 2017 12:10 am
No new posts Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us