Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Wanted to cpy the COMP3 data to COMP or cha format in Out f

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

New User


Joined: 11 Apr 2006
Posts: 41
Location: Chennai

PostPosted: Thu Feb 22, 2007 3:45 pm    Post subject: Wanted to cpy the COMP3 data to COMP or cha format in Out f
Reply with quote

Hello,

I have one PS file in that those fields has COMP3 data. I would like to copy that file information into output PS file but I would like to see the data in character format in output PS file not in COMP-3 format. Could you please suggest me if is there any way to copy the data from input file to output file by changing the COMP3 data to COMP or character format.

Thanks&Regrads,
Suresh
Back to top
View user's profile Send private message

UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 757
Location: Germany

PostPosted: Thu Feb 22, 2007 3:55 pm    Post subject: Re: Wanted to cpy the COMP3 data to COMP or cha format in Ou
Reply with quote

Hi !

You could do the copy via the Sort-Utility. By using masks for the comp3-data you could transform them to numeric data you could read.

Suppose you have input records with numeric values stored in PD format that you want to display or print so they can be easily interpreted. PD values are stored as integers in a compressed internal format that is actually unreadable if you print or display the values.
However, you know that:
The first PD field represents a number with two decimal places.
The second PD field represents a number with three decimal places.
The third PD field represents a date in the form mmddyyyy.
You can use the edit features of the OUTREC statement to display the digits of the PD values as readable characters. Furthermore, you can use the edit features to insert signs, commas, decimal points and hyphens, as appropriate, to make the PD values easy to interpret.

You can use the following OUTREC statement to make the PD values meaningful:
OUTREC FIELDS=(1,8,
5X,
11,6,PD,M4,
5X,
31,7,PD,EDIT=(SI,III,III,IIT.TTT),SIGNS=(,-),
5X,
41,5,PD,EDIT=(TT-TT-TTTT))


M4 is one of DFSORT's 27 pre-defined edit masks. It edits a numeric field according to the pattern SI,III,III,III,IIT.TT. EDIT=(SI,III,III,IIT.TTT) is a user-defined edit mask. It edits a numeric field according to the pattern SI,III,III,IIT.TTT. EDIT=(TT-TT-TTTT) is another user-defined edit mask. It edits a numeric field according to the pattern TT-TT-TTTT.

For all pre-defined masks have a look at bookmanager / sort.

Regards, UmeySan
Back to top
View user's profile Send private message
sureshbabu.jv

New User


Joined: 11 Apr 2006
Posts: 41
Location: Chennai

PostPosted: Thu Feb 22, 2007 4:21 pm    Post subject: Hello
Reply with quote

Thanks UmeySan!!

I will try with that file declaration :

Those fields declared like below in Input file, I would like to convert all those fileds into COMP or Char format in to output file.

10 MRSX-EQPT-LOC.
15 MRSX-EL-AREA PIC X(03).
15 MRSX-EL-ELEV PIC X(04).
15 MRSX-EL-COLM PIC X(05).
15 MRSX-EL-AZIM PIC X(03).
10 MRSX-COMP3-DATA COMPUTATIONAL-3.
15 MRSX-EST-MATL-STK PIC S9(09)V9(02).
15 MRSX-EST-MATL-NS PIC S9(09)V9(02).
15 MRSX-EST-LABOR-HR-ELSPD PIC S9(09)V9(02).
15 MRSX-EST-LABOR-HR-TOT PIC S9(09)V9(02).
15 MRSX-EST-LABOR-COST PIC S9(09)V9(02).
15 MRSX-EST-CONTRACT PIC S9(09)V9(02).
15 MRSX-EST-TECH-DIRECT PIC S9(09)V9(02).
15 MRSX-ACT-MATL-STK PIC S9(09)V9(02).
15 MRSX-ACT-MATL-NS PIC S9(09)V9(02).
15 MRSX-ACT-LABOR-COST PIC S9(09)V9(02).
15 MRSX-ACT-CONTRACT PIC S9(09)V9(02).
15 MRSX-ACT-TECH-DIRECT PIC S9(09)V9(02).

Thanks,
Suresh
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 Move from Comp3 variable to Edited Va... sreekusr COBOL Programming 8 Thu Aug 10, 2017 4:20 pm
No new posts Unable to copy data from spool in a d... srikant314 JCL & VSAM 8 Fri Jul 28, 2017 9:10 pm
No new posts Paasing symbolic parameter to instrea... Robert Sample JCL & VSAM 2 Thu Jul 27, 2017 1:22 pm
No new posts Passing data from REXX to C programme... chong.zhou CLIST & REXX 3 Wed Jul 26, 2017 9:11 pm
No new posts copying data without knowing location Arun Raj DFSORT/ICETOOL 12 Thu Jul 20, 2017 1:03 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us