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

Checking for spaces or blanks in Cobol


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
abhishek mitra

New User


Joined: 24 Feb 2008
Posts: 48
Location: Kolkata

PostPosted: Wed Mar 19, 2008 3:09 pm
Reply with quote

Hi,

I was trying to check for whether a value is coming spaces or blanks from the CICS screen. If it is coming spaces or blank I shall update NULL in table.
the field which catches the data in the CICS is Numeric and the field I use in the Cobol that is too Numeric.

Can anyone please help me to get the logic.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Mar 19, 2008 3:56 pm
Reply with quote

after receiving the screen and interrogating the field, if the input screen field is <= spaces (BLANKS????? that is not a cobol term) then set the null-indicator for that column to -1, else move the value to the host variable used for the column in the insert command and set the null-indicator to zero.
Back to top
View user's profile Send private message
abhishek mitra

New User


Joined: 24 Feb 2008
Posts: 48
Location: Kolkata

PostPosted: Wed Mar 19, 2008 4:22 pm
Reply with quote

dbzTHEdinosauer wrote:
after receiving the screen and interrogating the field, if the input screen field is <= spaces (BLANKS????? that is not a cobol term) then set the null-indicator for that column to -1, else move the value to the host variable used for the column in the insert command and set the null-indicator to zero.


Hi,
thanks for your reply. By blanks I did mean that in the CICS screen the field has not been entered at all. It has been left vacant. How d i check for that?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Mar 19, 2008 4:33 pm
Reply with quote

I do not remember the name of the mask but in this case the usual
procedure is to chek if the MDT is on
MDT = modified data tag
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Wed Mar 19, 2008 4:59 pm
Reply with quote

What is MDT ?

A Bit in the attribute byte indicating modification of field on screen.If the user keys in any data into the field, it turns the MDT ON indicating that the data is modified. To save transmission time , 3270 terminal sends a field over the TC line only if the MDT is on. Otherwise, the field value is not transmitted.

More informations on BMS & good overview:
publib.boulder.ibm.com/infocenter/txformp/v6r0m0/index.jsp?topic=/com.ibm.cics.te.doc/erziah0035.htm

Regards, UmeySan
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top