View previous topic :: View next topic
|
Author |
Message |
Thilaga
New User
Joined: 29 Feb 2008 Posts: 5 Location: Chennai
|
|
|
|
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 |
|
|
sri_mf
Active User
Joined: 31 Aug 2006 Posts: 218 Location: India
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
sri_mf
Active User
Joined: 31 Aug 2006 Posts: 218 Location: India
|
|
|
|
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 |
|
|
rpuhlman
New User
Joined: 11 Jun 2007 Posts: 80 Location: Columbus, Ohio
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
rpuhlman,
good catch and post. thx |
|
Back to top |
|
|
ksk
Active User
Joined: 08 Jun 2006 Posts: 355 Location: New York
|
|
|
|
rpuhlman,
I think OP wants all Z with FILLER not with a defined variable as you have shown. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
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 |
|
|
Thilaga
New User
Joined: 29 Feb 2008 Posts: 5 Location: Chennai
|
|
|
|
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 |
|
|
sandip_mainframe Warnings : 2 New User
Joined: 20 Sep 2006 Posts: 63 Location: pune
|
|
|
|
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 |
|
|
Thilaga
New User
Joined: 29 Feb 2008 Posts: 5 Location: Chennai
|
|
|
|
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 |
|
|
acevedo
Active User
Joined: 11 May 2005 Posts: 344 Location: Spain
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
|