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

How to display America instead of AMERICA


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

New User


Joined: 21 Jan 2006
Posts: 48
Location: india

PostPosted: Thu Oct 18, 2007 10:14 am
Reply with quote

Hello All,
I want to display America instead of AMERICA, could u let me know this
Back to top
View user's profile Send private message
nuthan

Active User


Joined: 26 Sep 2005
Posts: 146
Location: Bangalore

PostPosted: Thu Oct 18, 2007 10:25 am
Reply with quote

INSPECT variable1 CONVERTING 'abcd....xyz' TO 'ABCD....XYZ'
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Thu Oct 18, 2007 10:49 am
Reply with quote

Check this link too

http://ibmmainframes.com/about1856.html
Back to top
View user's profile Send private message
shankar.v

Active User


Joined: 25 Jun 2007
Posts: 196
Location: Bangalore

PostPosted: Thu Oct 18, 2007 12:50 pm
Reply with quote

jackal,

Please check with the following code for your requirement.
Code:
       IDENTIFICATION DIVISION.                             
       PROGRAM-ID. B.                                       
       DATA DIVISION.                                       
       WORKING-STORAGE SECTION.                             
       77 WS-IN PIC X(80) VALUE SPACES.                     
       77 WS-OUT PIC X(80) VALUE SPACES.                   
       PROCEDURE DIVISION.                                 
           ACCEPT WS-IN                                     
           DISPLAY 'WS-IN  ==> ' WS-IN                     
           MOVE WS-IN(1:1) TO WS-OUT.                       
           MOVE FUNCTION LOWER-CASE(WS-IN(2:)) TO WS-OUT(2:)
           DISPLAY 'WS-OUT ==> ' WS-OUT                     
           GOBACK.

Input:
Code:
AMERICA

Output:
Code:
WS-IN  ==> AMERICA
WS-OUT ==> America
Back to top
View user's profile Send private message
shankar.v

Active User


Joined: 25 Jun 2007
Posts: 196
Location: Bangalore

PostPosted: Thu Oct 18, 2007 12:57 pm
Reply with quote

jackal,

Please check with the following sort jcl for your requirement
Code:
// EXEC PGM=SORT                   
//SORTIN DD *                     
AMERICA                           
/*                                 
//SORTOUT DD SYSOUT=*             
//SYSOUT DD SYSOUT=*               
//SYSIN DD *                       
 OPTION COPY                       
 INREC OVERLAY=(2:2,79,TRAN=(UTOL))
/*
//

Output:
Code:
America
Back to top
View user's profile Send private message
HARLEEN SINGH MANN
Warnings : 2

New User


Joined: 03 Aug 2007
Posts: 17
Location: Pune

PostPosted: Fri Oct 19, 2007 11:06 pm
Reply with quote

A simpler way to do this withour using "move function lower-case" is to
use CAPS OFF on the command line of the editor and move that string to ww-<output variable> and dispaly it.

ie. MOVE 'america' TO WW-1
DISPLAY WW-1
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 How to display the leading zeros of a... DB2 7
No new posts SDSF display Max-RC in different colors TSO/ISPF 4
No new posts Converting a file from PD to display ... SYNCSORT 4
No new posts Unable to display comp variable COBOL Programming 4
No new posts Adding FIND to ISPF Panel display of ... TSO/ISPF 3
Search our Forums:

Back to Top