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
 
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: 2285
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: 10326
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: 8165
Location: East Dubuque, Illinois, USA

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 Extend the decimal values in DIVISION Balaryan DFSORT/ICETOOL 3 Thu Oct 05, 2017 4:05 pm
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts JOINKEYS Paired and Unpaired Sort MFwhiz DFSORT/ICETOOL 4 Fri Sep 29, 2017 1:48 am
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm
No new posts OC4 in SORT Mohan Kothakota DFSORT/ICETOOL 2 Tue Sep 12, 2017 6:30 pm

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