View previous topic :: View next topic |
Author |
Message |
wolves Beginner
Joined: 11 Jun 2004 Posts: 17 Topics: 8
|
Posted: Fri Jun 11, 2004 11:31 pm Post subject: moving to alpha field to use low-values? |
|
|
I have a field defined as --------9.99, followed by a filler of '-', but some of my output fields print as such ".............-". I was thinking of moving the field to an alphanumeric field and using low-values and moving spaces to it. But not exactly sure how to go about this.
Thanks in advance. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12380 Topics: 75 Location: San Jose
|
Posted: Sat Jun 12, 2004 8:58 am Post subject: |
|
|
Wolves,
Post detailed information on what you're trying to accomplish. Do not make people guess what you mean. This will give you a much better chance of getting a good answer to your question.
This is what I have grasped from your post
Code: |
01 WS-VAR.
05 WS-NUM PIC ----9.99.
05 FILLER PIC X(01) VALUE '-'.
|
Do you want to move LOW-VALUES OR SPACES to WS-VAR? If yes, then you can movelow-values or spaces to ws-var.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
wolves Beginner
Joined: 11 Jun 2004 Posts: 17 Topics: 8
|
Posted: Sun Jun 13, 2004 10:21 pm Post subject: |
|
|
Sorry for not putting more info out there.
I will post the field definitions tomorrow.
Thanks in advance. |
|
Back to top |
|
 |
wolves Beginner
Joined: 11 Jun 2004 Posts: 17 Topics: 8
|
Posted: Mon Jun 14, 2004 8:53 am Post subject: |
|
|
Here is the info: As you can see, even though this is not lined up correctly, but if you would paste it to word or notepad, you will see that THIS-FIELD4 comes out a little messed up, cannot figure out why. The input file is sometimes 0, or spaces, either way, it is messed up.
Thx
[code:1:4d3a63ff84]
WORKING-STORAGE SECTION.
01 PROGRAM-NAME PIC X(08 ).
01 WS-WORK-AREA.
05 Field-x PIC 9(6).
05 Field-xx PIC 9(5).
05 Field-xxx PIC S9(15)V9(02).
05 EOF PIC X VALUE 'N'.
COPY INPUT-STRUC.
(01 INPUT-REC.
05 THIS-FIELD PIC X(6).
05 IN-MONETARY-FIELDS.
10 THIS-FIELD2 PIC S9(9)V99 COMP-3.
10 THIS-FIELD3 PIC S9(9)V99 COMP-3.
10 THIS-FIELD4 PIC S9(9)V99 COMP-3.
10 THIS-FIELD5 PIC S9(9)V99 COMP-3.)
COPY OUTPUT-STRUC.
(01 OUTPUT-REC.
05 THAT-FIELD PIC X(6).
05 OUT-MONETARY-FIELDS
10 THAT-FIELD2 PIC --------9.99.
10 FILLER PIC X(01) VALUE '~'.
10 THAT-FIELD3 PIC --------9.99.
10 FILLER PIC X(01) VALUE '~'.
10 THAT-FIELD4 PIC --------9.99.
10 FILLER PIC X(01) VALUE '~'.
10 THAT-FIELD5 PIC --------9.99.
10 FILLER PIC X(01) VALUE '~'.)
MAINLINE
PERFORM 1000-FIRST
PERFORM 2000-FILE UNTIL EOF= |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12380 Topics: 75 Location: San Jose
|
Posted: Mon Jun 14, 2004 9:52 am Post subject: |
|
|
Quote: |
The input file is sometimes 0, or spaces, either way, it is messed up.
|
Shouldn't your program abend if it contains spaces? as your input structure is having comp-3 fields.
Btw what is the recfm of input and output files?
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
|
|