Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups 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
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
References
dbzTHEdinosauer

Senior Member


Joined: 20 Oct 2006
Posts: 1671
Location: germany

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

Global Moderator


Joined: 23 Nov 2006
Posts: 9187
Location: 221 B Baker St

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

Global Moderator


Joined: 23 Nov 2006
Posts: 9187
Location: 221 B Baker St

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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1