IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Handling Null values in OUTREC of a sort


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 2481
Location: @my desk

PostPosted: Tue Oct 21, 2008 8:22 am
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
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Tue Oct 21, 2008 1:10 pm
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: 8797
Location: Welsh Wales

PostPosted: Tue Oct 21, 2008 1:21 pm
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue Oct 21, 2008 4:47 pm
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: 8797
Location: Welsh Wales

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

OK, how about

36_2_35.gif
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Oct 21, 2008 9:43 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 8
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top