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
 
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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am
No new posts Fetch Previous month & year in MM... girishb2 DFSORT/ICETOOL 3 Thu Sep 21, 2017 9:54 pm

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