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
 

 

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: 1753
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: 1753
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: 1280
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 Batch job tuning sgandhla Testing & Performance analysis 0 Fri Mar 24, 2017 9:41 pm
No new posts MIPS/CPU consumption reduction in Batch vishwakotin DFSORT/ICETOOL 4 Sat Mar 18, 2017 5:46 pm
No new posts loading a Modified Mapset Susanta CICS 2 Tue Mar 14, 2017 5:43 pm
No new posts VALIDATE NULL VALUE IN DB2 CASE STATE... useit DB2 5 Thu Feb 09, 2017 4:34 pm
No new posts How does a called pgm know if its cal... Graeme Westerman COBOL Programming 4 Tue Nov 29, 2016 9:25 pm


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