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: 2276
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: 10256
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: 8057
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 Sorting of hex values Saurabh_mi DFSORT/ICETOOL 11 Thu May 25, 2017 3:49 pm
No new posts How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am


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