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

Group condition checking


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

New User


Joined: 08 Jan 2007
Posts: 53
Location: Chennai

PostPosted: Wed Jul 16, 2008 2:32 am
Reply with quote

Hi There,

I would like to check group variable for spaces

25 XXXX-kkkk-000-DETAILS.
30 XXXX -aaaa-TREA-CODE PIC X(2).
30 XXXX-aaaa-BLCK-ADDR PIC X(1).
30 XXXX-aaaa-LETR-SORT PIC X(1).
30 XXXX-aaaa-PLAC-WORD PIC X(60).
30 XXXX-aaaa-DSGN PIC X(60).
30 XXXX-aaaa-ADDR-TTL PIC X(15).
30 XXXX-aaaa-TTL-ST PIC X(15).

Can you please check below statement is right

i.e If XXXX-kkkk-000-DETAILS is not space
statements
end-if
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: Wed Jul 16, 2008 2:42 am
Reply with quote

Hello,

Suggest this change:
If XXXX-kkkk-000-DETAILS is not = spaces
Back to top
View user's profile Send private message
RamsIBM

New User


Joined: 08 Jan 2007
Posts: 53
Location: Chennai

PostPosted: Wed Jul 16, 2008 3:12 am
Reply with quote

Thanks...
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Wed Jul 16, 2008 5:05 am
Reply with quote

Is it OK to have any byte less than or equal to SPACE (X'00' through X'40')?

Then, you may want to change your test to NOT > SPACES, which will cover this byte-range....

Bill
Back to top
View user's profile Send private message
RamsIBM

New User


Joined: 08 Jan 2007
Posts: 53
Location: Chennai

PostPosted: Thu Jul 17, 2008 12:10 am
Reply with quote

Thanks!!

If XXXX-kkkk-000-DETAILS > spaces

is it above statment is valid for group check
Back to top
View user's profile Send private message
ashimer

Active Member


Joined: 13 Feb 2004
Posts: 551
Location: Bangalore

PostPosted: Thu Jul 17, 2008 4:55 pm
Reply with quote

Yes Rams it is valid ...
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 Compare latest 2 rows of a table usin... DB2 1
No new posts Problem with IFTHEN=(WHEN=GROUP,BEGIN... DFSORT/ICETOOL 5
No new posts Splitting group records based on deta... DFSORT/ICETOOL 8
No new posts How to give complex condition in JCL . CLIST & REXX 30
No new posts REXX - Dataset checking in a do forev... CLIST & REXX 6
Search our Forums:

Back to Top