View previous topic :: View next topic
|
Author |
Message |
cvishu
Active User
Joined: 31 Jul 2007 Posts: 136 Location: india
|
|
|
|
I want to write " Hello" as such in the output file. That is H has to be in capital and rest in small. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
What happened when you tried it ? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Quote: |
Is it possible through Cobol ? |
yes. |
|
Back to top |
|
|
cvishu
Active User
Joined: 31 Jul 2007 Posts: 136 Location: india
|
|
|
|
dbzTHEdinosauer
can you please tell how? ..
expat
I tried.. all output was in caps HELLO.
Thanks |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10889 Location: italy
|
|
|
|
post the code You used!
what happens when You run something along ...
Code: |
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO-WORLD.
ENVIRONMENT DIVISION.
DATA DIVISION.
PROCEDURE DIVISION.
DISPLAY 'Hello, world.'.
STOP RUN.
|
I do not speak COBOLESE ...
make the appropriate corrections in order to have the snippet compile properly
and see what happens when You run it!
watch out for the caps settings in Your ISPF edit session! |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
What version/release of COBOL are you running?
Bill |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Code: |
01 WS-VARIABLES.
05 WS-RECORD PIC X(80) VALUE
'Hello'.
01 OUT-FILE-FS PIC 9(02) VALUE 00.
/
PROCEDURE DIVISION.
S1000-MAIN SECTION.
OPEN OUTPUT OUT-FILE.
DISPLAY 'OPEN OUT-FILE FS = ' OUT-FILE-FS.
WRITE OUT-FILE-REC FROM WS-RECORD.
DISPLAY 'WRITE FILE STATUS = ' OUT-FILE-FS.
CLOSE OUT-FILE.
DISPLAY 'CLOSE FILE STATUS = ' OUT-FILE-FS.
STOP RUN. |
produces a file with
Code: |
********************************* Top of Data **********************************
Hello
******************************** Bottom of Data ******************************** |
|
|
Back to top |
|
|
cvishu
Active User
Joined: 31 Jul 2007 Posts: 136 Location: india
|
|
|
|
Robert Sample
i tried the same .. could it cobol version problem ? or do i need to check any settings ?
I am not sure about my cobol version . |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
if your ISPF Profile is set to CAPS ON, you will only have upper case characters in you source file.
what does your source file look like with respect to however you have coded the characters 'Hello World'.
Quote: |
I am not sure about my cobol version |
Sigh....the version can be ascertained by looking at your compile output listing. |
|
Back to top |
|
|
cvishu
Active User
Joined: 31 Jul 2007 Posts: 136 Location: india
|
|
|
|
Will ISPF profile have any significance , whenwe run through CA7 sheduler ? am not running through my local . |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
There is no impediment in COBOL to writing lower case data, as my example shows. If you're having a problem, it is either because your source data is not lower case, or you are forcing upper case somehow. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
cvishu wrote: |
I am not sure about my cobol version . |
If you review your compile listing, at the top of each page, it will indicate your COBOL version/release, such as (example only) -
Code: |
IBM COBOL for OS/390 & VM 2.2.1
|
Is this homework?
Bill |
|
Back to top |
|
|
|