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
 

 

Change the value of 88 Level condition variable dynamically.

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

New User


Joined: 14 Sep 2012
Posts: 9
Location: India

PostPosted: Fri Oct 05, 2012 1:00 pm    Post subject: Change the value of 88 Level condition variable dynamically.
Reply with quote

Hi,

I am working on a requirement where the module is fetching 400 rows in below varaible:
Code:
01 WS-ARRAY
   O2 WS-STATUS-ARRAY     OCCURS 400 TIMES INDEXED BY WS-INDEX
      05 WS-STATUS        PIC X(02) VALUE SAPCES.

And there is a input file with below structure:
Code:
01 FS-FILE1.
   05 FS-NAME             PIC X(30).
   05 FILLER              PIC X(50).
   05 FS-STATUS           PIC X(02).

So I want to know that - Is it possible to link WS-STATUS to FS-STATUS?
i.e.
Is there any way to code it like below:
Code:
01 FS-FILE1.
   05 FS-NAME             PIC X(30).
   05 FILLER              PIC X(50).
   05 FS-STATUS           PIC X(02).
      88 FS-ACTIVE-STATUS VALUE IS <All 400 values from WS-STATUS>

Thanks
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Fri Oct 05, 2012 1:21 pm    Post subject: Reply to: Change the value of 88 Level condition variable dy
Reply with quote

If I've understood the explanation, no.

Perhaps your best bet would be SEARCH ALL on the (up to) 400. Prior to doing the SEARCH ALL, check that the key is different from the previous - if the same, no need for the SEARCH ALL, just use the previous data.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2435
Location: Netherlands, Amstelveen

PostPosted: Fri Oct 05, 2012 2:22 pm    Post subject:
Reply with quote

Quote:

05 WS-STATUS PIC X(02) VALUE SAPCES


What are SAPCES?
Back to top
View user's profile Send private message
Pratap Kapse

New User


Joined: 14 Sep 2012
Posts: 9
Location: India

PostPosted: Fri Oct 05, 2012 3:07 pm    Post subject:
Reply with quote

Bill,
Yes it looks like that is the only solution. And thank you for suggestion about previous record.

Peter,
Sorry, that was a typo. Please read it as SPACES.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1770
Location: Bloomington, IL

PostPosted: Fri Oct 05, 2012 3:08 pm    Post subject:
Reply with quote

PeterHolland wrote:
Quote:

05 WS-STATUS PIC X(02) VALUE SAPCES


What are SAPCES?

A sapce has the hex value 4O in EBCDIC.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Fri Oct 05, 2012 5:16 pm    Post subject: Reply to: Change the value of 88 Level condition variable dy
Reply with quote

Quote:
A sapce has the hex value 4O in EBCDIC.


/friday afternoon on
I always thought that
A sapce was the hex value 4O in ECBDIC.
/friday afternoon off
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8117
Location: East Dubuque, Illinois, USA

PostPosted: Fri Oct 05, 2012 5:25 pm    Post subject:
Reply with quote

Pratap Kapse, the values in the 88 level are established when you compile the program. The input values from the file cannot be known until you execute the program. Hence there is no way that you could recompile the program while it is executing to pick up the values form the input file, and this is what you are wanting to do.
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 Can I traverse a STEM variable? chong.zhou CLIST & REXX 5 Wed May 31, 2017 3:54 pm
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm


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