MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

moving to alpha field to use low-values?

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
wolves
Beginner


Joined: 11 Jun 2004
Posts: 17
Topics: 8

PostPosted: Fri Jun 11, 2004 11:31 pm    Post subject: moving to alpha field to use low-values? Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12380
Topics: 75
Location: San Jose

PostPosted: Sat Jun 12, 2004 8:58 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
wolves
Beginner


Joined: 11 Jun 2004
Posts: 17
Topics: 8

PostPosted: Sun Jun 13, 2004 10:21 pm    Post subject: Reply with quote

Sorry for not putting more info out there.
I will post the field definitions tomorrow.
Thanks in advance.
Back to top
View user's profile Send private message
wolves
Beginner


Joined: 11 Jun 2004
Posts: 17
Topics: 8

PostPosted: Mon Jun 14, 2004 8:53 am    Post subject: Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12380
Topics: 75
Location: San Jose

PostPosted: Mon Jun 14, 2004 9:52 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group