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
 

 

Move some value into 88 Leval Variable.

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

New User


Joined: 02 Dec 2010
Posts: 2
Location: Chennai

PostPosted: Thu May 31, 2012 8:45 pm    Post subject: Move some value into 88 Leval Variable.
Reply with quote

Hi,

Please find an example below:

01 REGION-CODE PIC X(04).
88 IMSP-NMS VALUE 'IMSP'
88 IMSN-WMS VALUE 'IMSN'

MOVE 'IMSU' TO REGION-CODE.
SET IMSP-NMS TO TRUE.

Can any one help me what value will be stored in IMSP-NMS and IMSN-WMS?

Regards,
Raghav
Back to top
View user's profile Send private message

Naish

New User


Joined: 07 Dec 2006
Posts: 82
Location: UK

PostPosted: Thu May 31, 2012 9:03 pm    Post subject:
Reply with quote

Please use "DISPLAY IMSP-NMS" and "DISPLAY IMSN-WMS" (if you can)and show us what you get.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7995
Location: Bellevue, IA

PostPosted: Thu May 31, 2012 9:05 pm    Post subject:
Reply with quote

Sorry, but you completely and totally misunderstand the use of 88 levels. There is NO value stored in IMSP-NMS and IMSN-WMS since they are not data names of variables -- they are conditionals only and cannot be displayed, for example, since they do not have storage allcoated. For proof, here's the code:
Code:
       WORKING-STORAGE SECTION.
       01  REGION-CODE                 PIC X(04).
           88 IMSP-NMS                           VALUE 'IMSP'.
           88 IMSN-WMS                           VALUE 'IMSN'.
      /
       PROCEDURE DIVISION.
       S1000-MAIN       SECTION.
           MOVE 'IMSU'                 TO  REGION-CODE.
           SET IMSP-NMS                TO  TRUE.
           DISPLAY 'REGION CODE:<' REGION-CODE '>'.
           DISPLAY 'IMSP-NMS   :<' IMSP-NMS '>'.
           DISPLAY 'IMSN-WMS   :<' IMSP-WMS '>'.
and the compiler output:
Code:
   000013                WORKING-STORAGE SECTION.
   000014                01  REGION-CODE                 PIC X(04).
   000015                    88 IMSP-NMS                           VALUE 'IMSP'.
   000016                    88 IMSN-WMS                           VALUE 'IMSN'.
1PP 5655-G53 IBM Enterprise COBOL for z/OS  3.4.1               MF0229    Date 0
   LineID  PL SL  ----+-*A-1-B--+----2----+----3----+----4----+----5----+----6--
   000017               /
   000018                PROCEDURE DIVISION.
   000019                S1000-MAIN       SECTION.
   000020                    MOVE 'IMSU'                 TO  REGION-CODE.
   000021                    SET IMSP-NMS                TO  TRUE.
   000022                    DISPLAY 'REGION CODE:<' REGION-CODE '>'.
   000023                    DISPLAY 'IMSP-NMS   :<' IMSP-NMS '>'.

 ==000023==> IGYPS2074-S "IMSP-NMS" was defined as a type that was invalid in this context.  The
                         statement was discarded.

   000024                    DISPLAY 'IMSN-WMS   :<' IMSN-WMS '>'.

 ==000024==> IGYPS2074-S "IMSN-WMS" was defined as a type that was invalid in this context.  The
                         statement was discarded.
Based upon your posted code, REGION-CODE will have the value IMSP since the SET IMSP-NMS TO TRUE is the same thing as MOVE 'IMSP' TO REGION-CODE.
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1534
Location: Andromeda Galaxy

PostPosted: Thu May 31, 2012 9:24 pm    Post subject:
Reply with quote

Looks like an interview question and you could
have figured out yourself by writing a small program

check here for good examples
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: Fri Jun 01, 2012 12:35 am    Post subject:
Reply with quote

Hello and welcome to the forum,

If this is not an interview question, post what you are trying to accomplish and someone may have a suggestion.

Keep in mind that an 88 level entry is "read only" - nothing can be moved to it.
Back to top
View user's profile Send private message
raghukuna15

New User


Joined: 02 Dec 2010
Posts: 2
Location: Chennai

PostPosted: Fri Jun 01, 2012 5:26 pm    Post subject:
Reply with quote

Thanks to all for clarifying my doubt.
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 Writing on to GSAM variable length rohanthengal JCL & VSAM 6 Fri Mar 03, 2017 7:46 pm
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm
No new posts DB2 9.1.0 not move values to Host-Var... Miguel Fernandez DB2 8 Wed Jan 25, 2017 8:24 pm
No new posts DB2 9.1.0 not move values to Host-Var... Miguel Fernandez DB2 0 Wed Jan 25, 2017 8:23 pm
No new posts DB2 9.1.0 not move values to Host-Var... Miguel Fernandez DB2 0 Wed Jan 25, 2017 8:21 pm


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