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
 
reg : Handle Null Vals from Batch while loading using BMC ut

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

New User


Joined: 26 Jun 2007
Posts: 20
Location: Chennai

PostPosted: Tue May 03, 2011 5:29 pm    Post subject: reg : Handle Null Vals from Batch while loading using BMC ut
Reply with quote

I have a COBOL DB2 program which extracts data for reporting purpose from different tables and loads data (Use BMC load) into a report table.
The tables(fields) from which data extracted sometimes can be null and the same null value needs to be loaded into the report table . So I have used
null indicators in my output record to capture values for all nullable fields in the report table .

I have used PIC S9(4) USAGE COMP to handle all the null indicator valuesin the output file .

Ex.
Market rec
fld-a
fld-b
fld-b-nul
fld-c
fld-c-null
etc

When I unload the data from my report table it has LRECL of 488.
My program output fields along with null indicator fields has LRECL of 513

I am worried if my load would fail.

I need to how null indicators are handled and how they can be loaded in to the target table (fields that can accept null).

Regards,
Mohan
Back to top
View user's profile Send private message

Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1782
Location: Bloomington, IL

PostPosted: Tue May 03, 2011 7:07 pm    Post subject:
Reply with quote

You ought to begin by comparing the load control cards generated by BMC Unload+ to your COBOL record layout to see where the differences lie and whether they are significant.
Back to top
View user's profile Send private message
MoganaKumaran

New User


Joined: 26 Jun 2007
Posts: 20
Location: Chennai

PostPosted: Tue May 03, 2011 7:35 pm    Post subject:
Reply with quote

I have compared the control card genreated from BMC unload with the output file generated from batch output.

There is a difference and its trying to load data in different position.
The reason being .
I use following layout along with null indicator fields:

mkt-rec
fld-a
flda-null
fld-b
fld-b-null
... etc

The pattern generated from BMC unload is like this

mkt-rec
fld-a
fld-b

Due to this I m getting error while i m loading.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1782
Location: Bloomington, IL

PostPosted: Tue May 03, 2011 7:54 pm    Post subject:
Reply with quote

No, you don't use that layout; that is not valid COBOL code. And BMC doesn't generate those data, as those are not valid load control cards.

As you can't be bothered to tell the truth, I can't be bothered to help you.
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Tue May 03, 2011 9:03 pm    Post subject:
Reply with quote

BMC unload must generate some null indicators somewhere.
and your punch file should have them as well.
something like
Code:
, "COLUMN1"  POSITION(  00030:00035) CHAR(00005)       
                      NULLIF(00029)=X'FF'

If it looks like this, you should "handle all the null indicator values in the output file" as a PIC x(1) in which you would move HIGH-VALUES when null and LOW-VALUES when not null and place indicators before the column (=pos 29).

the difference 488 - 513 is probably that you defined 25 null indicators as
PIC s9(4) comp (=2 bytes) and a normal unload file uses PIC X (= 1 byte).
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 How to query MAXGENS of an existing P... Chuchulo Hatyzak JCL & VSAM 0 Wed Nov 22, 2017 10:23 pm
No new posts Table(Unicode(Graphic) table) loading... muralikrishnan_new DB2 0 Thu Oct 05, 2017 5:10 pm
No new posts Accessing CICS tran with map from JCL... navdeepaggarwal CICS 5 Tue Oct 03, 2017 6:15 pm
No new posts Generate public-private key in batch ... vasanthz All Other Mainframe Topics 6 Fri Sep 15, 2017 9:20 am
No new posts Working with hex values in Filemanage... Emile Straker IBM Tools 0 Tue Sep 12, 2017 1:42 am

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