Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Filler to fill entire line with a character

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

New User


Joined: 29 Feb 2008
Posts: 5
Location: Chennai

PostPosted: Fri Feb 29, 2008 1:36 pm    Post subject: Filler to fill entire line with a character
Reply with quote

Hi,

Can we use FILLER to fill an entire line with a character like '*' or 'z'

Say for ex,

05 FILLER PIC X(129) value 'Z'.

i want the entire 129 bytes to be filled with 'z'

Please help me to achieve this..
Back to top
View user's profile Send private message

sri_mf

Active User


Joined: 31 Aug 2006
Posts: 215
Location: India

PostPosted: Fri Feb 29, 2008 1:42 pm    Post subject: Reply to: Filler to fill entire line with a character
Reply with quote

Ur code will display */Z only once.U have move that many */Z inorder to display through a variable Else write a perform to display Z 129 times.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Fri Feb 29, 2008 2:15 pm    Post subject:
Reply with quote

though you can say move all 'z', you can't say value all 'Z'.

but what you can do, is put a level 88 under the filler with a value of all 'Z' and then set the 88 to true at begining of program.
Back to top
View user's profile Send private message
sri_mf

Active User


Joined: 31 Aug 2006
Posts: 215
Location: India

PostPosted: Fri Feb 29, 2008 2:30 pm    Post subject:
Reply with quote

dbzTHEdinosauer wrote:
though you can say move all 'z', you can't say value all 'Z'.

but what you can do, is put a level 88 under the filler with a value of all 'Z' and then set the 88 to true at begining of program.


I did not get u dino.. Can u please explain it ...
Back to top
View user's profile Send private message
rpuhlman

New User


Joined: 11 Jun 2007
Posts: 80
Location: Columbus, Ohio

PostPosted: Fri Feb 29, 2008 4:22 pm    Post subject:
Reply with quote

You can use VALUE ALL 'Z'.
Code:
       IDENTIFICATION          DIVISION.                               
       PROGRAM-ID.             LCA93ZB.                                 
       ENVIRONMENT             DIVISION.                               
       DATA                    DIVISION.                               
                                                                       
       WORKING-STORAGE SECTION.                                         
                                                                       
       01  WORK-AREA.                                                   
           03  WS-BEGIN                  PIC  X(80) VALUE ALL 'Z'.     
                                                                       
       PROCEDURE DIVISION.                                             
                                                                       
           DISPLAY 'ALL CHARACTERS = ' WS-BEGIN.                       
                                                                       
           GOBACK.       
                                             
                                                                       

Successful Compile:
Code:
             **      DATE............ 29FEB08 05:37     **                     
             **      ENDEVOR RC...... 0000              **                     
             **                                         **                     
             **      ENVIRONMENT..... ENV1              **                     
             **      STAGE........... TEST              **                     
             **      SYSTEM.......... HONDA             **                     
             **      SUBSYSTEM....... LCA               **                     
             **      ELEMENT......... LCA93ZB           **                     
             **      VV.LL........... 01.00             **                     
             **      TYPE............ COB2B             **                     
             **      PROC GROUP...... CIINB1            **                     
             **      PROCESSOR....... GHBAT             **                     
             **        INIT.......... RC=0000           **                     
             **        CONWRITE...... RC=0000           **                     
             **        STDS.......... RC=0000           **                     
             **        COB........... RC=0000           **                     
             **        LKED.......... RC=0000           **                     
             **                                         **                     
             *********************************************                     

Successful Execution:
Code:
05.40.12 JOB05899  *HAMTRT01 MMT8376A STEP10               00     22     21    .

Code:
IEF375I  JOB/MMT8376A/START 2008060.0540                                       
IEF376I  JOB/MMT8376A/STOP  2008060.0540 CPU    0MIN 00.00SEC SRB    0MIN 00.00S
ALL CHARACTERS = ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Fri Feb 29, 2008 4:24 pm    Post subject:
Reply with quote

rpuhlman,

good catch and post. thx
Back to top
View user's profile Send private message
ksk

Active User


Joined: 08 Jun 2006
Posts: 356
Location: New York

PostPosted: Fri Feb 29, 2008 4:31 pm    Post subject:
Reply with quote

rpuhlman,

I think OP wants all Z with FILLER not with a defined variable as you have shown.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10308
Location: italy

PostPosted: Fri Feb 29, 2008 4:42 pm    Post subject: Reply to: Filler to fill entire line with a character
Reply with quote

the o/p should try to help him/her-self by running a small test with something like:
Code:
xx  .....                                           
     yy .....
     yy .....
     yy FILLER  PIC  X(129) VALUE ALL 'Z'.     
     yy .....
     yy .....
Back to top
View user's profile Send private message
Phrzby Phil

Active Member


Joined: 31 Oct 2006
Posts: 965
Location: Richmond, Virginia

PostPosted: Fri Feb 29, 2008 7:04 pm    Post subject:
Reply with quote

Participating in this website I have found to be an excellent means to work on my patience. Of course, I have lost it on occasion.
Back to top
View user's profile Send private message
Thilaga

New User


Joined: 29 Feb 2008
Posts: 5
Location: Chennai

PostPosted: Mon Mar 03, 2008 7:55 am    Post subject:
Reply with quote

Hi rpuhlman,

I got it. This is what i wanted. it is not a matter of using a filler or a defined variable. But VALUE ALL works fine with both.

Thanks yaar. Thank you all for your responses...
Back to top
View user's profile Send private message
sandip_mainframe
Warnings : 2

New User


Joined: 20 Sep 2006
Posts: 61
Location: pune

PostPosted: Mon Mar 03, 2008 2:36 pm    Post subject:
Reply with quote

Hi,
we cann't use FILLER for displaying such value we can define any variable with value all.

ID DIVISION.
PROGRAM-ID. COBOL1.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 A PIC X(80) VALUE ALL '*'.
PROCEDURE DIVISION.
DISPLAY ' VALUE OF VARIABLE IS : ' A.
STOP RUN.

It wil display output as
******************************************

Thanks And Regards
Sandip Walsinge
Back to top
View user's profile Send private message
Thilaga

New User


Joined: 29 Feb 2008
Posts: 5
Location: Chennai

PostPosted: Mon Mar 03, 2008 2:41 pm    Post subject:
Reply with quote

Sandip,

FILLER also can be used with VALUE ALL to display such value.

I have tested the code. it works fine.

--
Thilaga.
Back to top
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Mon Mar 03, 2008 3:30 pm    Post subject:
Reply with quote

as Thilaga I've tested and works fine
Code:

05 W-HELLO-WORD.                                           
   10 W-HW-PART1          PIC X(11) VALUE 'HELLO WORLD'.   
   10 FILLER              PIC X(10) VALUE ALL '!'. 

PROCEDURE
     DISPLAY W-HELLO-WORD
       



1 minute to test it!

BTW: Phrzby Phil... very much YES!
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: Mon Mar 03, 2008 8:49 pm    Post subject:
Reply with quote

Hello,

Quote:
we cann't use FILLER for displaying such value we can define any variable with value all.
Why would you believe this? Is this just your mis-understanding or were you part of an entire class that has been taught this incorrectly? Might this be some local system standard rather than a compiler issue?

If you are going to post something as fact/true, you should test it first to confirm that what you intend to post is correct. . . .
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 Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts the use of 'B3'x character in a panel Pedro TSO/ISPF 1 Thu Feb 16, 2017 3:09 am
This topic is locked: you cannot edit posts or make replies. DSList (3.4) cannot display Chinese c... jacobdng TSO/ISPF 4 Wed Oct 05, 2016 2:51 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us