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
 

 

Handling Null values in OUTREC of a sort

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
maverick05

New User


Joined: 14 Apr 2005
Posts: 54
Location: Earth

PostPosted: Tue Oct 21, 2008 7:40 am    Post subject: Handling Null values in OUTREC of a sort
Reply with quote

Hi,

I have a DB2 table for which i have to extract data and format it and load it to output file.

I have a nullable column in the Db2 table.How to handle/write outrec fields for this column

EX: OUTREC FIELDS=(1,5,912,C'EQS',6,1)

As per the above assume that nullable column in input record is at 6th position of 1 byte column.How to put nullable field here?

thanks
Back to top
View user's profile Send private message

Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2180
Location: @my desk

PostPosted: Tue Oct 21, 2008 8:22 am    Post subject:
Reply with quote

Hello,

I believe the concept of NULL fields does not make any sense in the case of files. You can't write a NULL field as NULL in DB2 means "the value is unknown". How will you write something out of nothing?
Back to top
View user's profile Send private message
maverick05

New User


Joined: 14 Apr 2005
Posts: 54
Location: Earth

PostPosted: Tue Oct 21, 2008 8:43 am    Post subject: Reply to: Handling Null values in OUTREC of a sort
Reply with quote

Well,i got the answer.We need to use X'40' for the extra null column at the end of output sortrec utilised for DB2 nullable field

Tx
Back to top
View user's profile Send private message
samuel_Inba

New User


Joined: 03 Jan 2008
Posts: 53
Location: Chennai

PostPosted: Tue Oct 21, 2008 12:48 pm    Post subject:
Reply with quote

FYA.

X'40' doesnt represent null.. .its just the hex value of space... dont misunderstand... Space is NOT equal to NULL.


Regards,
Sam.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Tue Oct 21, 2008 1:10 pm    Post subject: Reply to: Handling Null values in OUTREC of a sort
Reply with quote

the NULL issue has been going on and on,
until people understand the NULL concept there is little we can do to help

to keep it short

the content of a field is always a value..

to represent NULLness You need two fields
a data field which contains ( possibly ) the ... data ...
a flag which tells if any data exists

giving to some content of the field the meaning of nullness is a local convention

the only generally used convention for nullness is the pointer convention
of C language a pointer containing a 0 is NULL poiner ( does not point anywhere)
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Oct 21, 2008 1:21 pm    Post subject:
Reply with quote

Quote:
the only generally used convention for nullness is the pointer convention
of C language a pointer containing a 0 is NULL poiner ( does not point anywhere)

So, it's pointless really icon_lol.gif
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7931
Location: Bellevue, IA

PostPosted: Tue Oct 21, 2008 4:47 pm    Post subject:
Reply with quote

Quote:
the only generally used convention for nullness is the pointer convention
of C language a pointer containing a 0 is NULL poiner ( does not point anywhere)

So, it's pointless really
It's too early in the day here to run across this without warning ... we need another emoticon for these things so people would know they're coming.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Oct 21, 2008 4:48 pm    Post subject:
Reply with quote

OK, how about

36_2_35.gif
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: Tue Oct 21, 2008 9:43 pm    Post subject: Reply to: Handling Null values in OUTREC of a sort
Reply with quote

Quote:
So, it's pointless really

Or pointerless. . .

Quote:
It's too early in the day here to run across this without warning ... we need another emoticon for these things so people would know they're coming.
This emoticon would hopefully contain an audible as well?

d
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Overlaying one set of charater values... Kevin Lindsley SYNCSORT 7 Sat Nov 05, 2016 3:21 am
No new posts Low values Results from VARCHAR FORMAT balaji81_k DB2 10 Thu Oct 20, 2016 1:18 am


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