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
 

 

Give a practical example on condition names

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
knd_r
Currently Banned

New User


Joined: 18 Mar 2005
Posts: 48

PostPosted: Mon May 23, 2005 11:25 am    Post subject: Give a practical example on condition names
Reply with quote

hi,

can any one give a practical example on condition names.

bye,
ks reddy.
Back to top
View user's profile Send private message

kanak

Moderator


Joined: 12 Mar 2005
Posts: 252
Location: India

PostPosted: Mon May 23, 2005 11:45 am    Post subject:
Reply with quote

hi,
let's take one example.Suppose on cics screen is capable of performing 4 actvities like on PF7 it will scroll backward, on PF8 it will scroll Forward, on PF10 it will scroll LEft and on PF11 it will scroll to right direction. Then u can just keep on varible as read-direction.
so you can set the value of varibale read-direction as the key pressed. Based upon that u can do certain operation.
Or like u can validate the fuction name it supports, thru condition name...
like
01 valid-function PIC x(10).
88 func1 value 'one'
88 func2 value 'two'.

like this way u can use just one varibale and get the result. Hope tis is clear to you. Let us know if u have any clarification.
Back to top
View user's profile Send private message
knd_r
Currently Banned

New User


Joined: 18 Mar 2005
Posts: 48

PostPosted: Mon May 23, 2005 8:01 pm    Post subject:
Reply with quote

please give me an example from your project where you used condition names?

thanks,
ks reddy.
Back to top
View user's profile Send private message
priya

Moderator


Joined: 24 Jul 2003
Posts: 568
Location: Bangalore

PostPosted: Mon May 23, 2005 9:40 pm    Post subject:
Reply with quote

Code:
01 A PIC 9.
   88 MALE VALUE 0.
   88 FEMALE VALUE 1.

ACCEPT A.

IF MALE DISPLAY "I am Male"
ELSE IF FEMALE DISPLAY "I am Female"
ELSE DISPLAY "WHO AM I".
Back to top
View user's profile Send private message
kanak

Moderator


Joined: 12 Mar 2005
Posts: 252
Location: India

PostPosted: Tue May 24, 2005 9:34 am    Post subject:
Reply with quote

the example i have given is one of the real time scenario only..
Back to top
View user's profile Send private message
rameshbabu
Warnings : 1

New User


Joined: 23 May 2005
Posts: 27

PostPosted: Tue May 24, 2005 12:18 pm    Post subject: is there any option to find the no of records in a dataset?
Reply with quote

hi plz go thru this
Back to top
View user's profile Send private message
priya

Moderator


Joined: 24 Jul 2003
Posts: 568
Location: Bangalore

PostPosted: Tue May 24, 2005 9:20 pm    Post subject:
Reply with quote

Try this...


Code:
01 MARKS PIC 999.
   88 FAIL VALUE 0 THRU 50.
   88 PASS VALUE 51 THRU 100.

ACCEPT MARKS.

IF PASS DISPLAY "GO TO THRID SEM"
ELSE IF FAIL DISPLAY "WRITE ONCE AGAIN"
ELSE DISPLAY "ARE YOU FROM SRM ENGINEERING COLLEGE?".
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts scheduling between OPC and TWS give u... nsbl IBM Tools 3 Sun Mar 12, 2017 5:35 pm
No new posts Joinkeys with condition scdinesh DFSORT/ICETOOL 10 Tue Feb 14, 2017 12:20 am
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
No new posts Variable for cursor names ravikumar15 DB2 5 Sun Jul 17, 2016 7:08 am
No new posts INCLUDE condition questions van bui DFSORT/ICETOOL 1 Thu Jun 30, 2016 9:52 am


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