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
 

 

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: 6966
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 Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm
No new posts How can we create a flat file in JAVA... rakesh.v18 Java & MQSeries 7 Fri Sep 23, 2016 10:46 pm
No new posts Need help to populate date in COMP-3 ... chetanambi DFSORT/ICETOOL 3 Tue Jun 21, 2016 12:25 pm
No new posts comparing comp-3 and unpacked numbers juares castro COBOL Programming 3 Mon May 30, 2016 6:46 pm
No new posts SIGNED DECIMAL TO COMP-3 using cobol ... ram_vizag COBOL Programming 1 Tue Mar 01, 2016 11:32 pm


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