IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Input is masked..how to declare this data to find totals


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ramesh_ibm

New User


Joined: 17 Nov 2007
Posts: 16
Location: banglore

PostPosted: Wed Jan 14, 2009 9:18 pm
Reply with quote

Hi All,

My input file has values like as follows
GROSS
21.2
122.2
121.2 ... and so on..I just want to calculate the sum of the column
and generate a report


When I use
FILE INP (10 ,1000)
INP-GRS 1 3 N 1 ..I am getting SOC7 abend..
Please help me how to declare such masked input
Back to top
View user's profile Send private message
technut

New User


Joined: 27 Dec 2007
Posts: 73
Location: India

PostPosted: Wed Jan 21, 2009 6:31 pm
Reply with quote

Looks like your input file has data declard in Alphanumeric format.. In that case you would have to declare the variable as alphanueric.

fld 1 5 A

Otherwise, obviously it will give SOC7...
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Jan 21, 2009 9:20 pm
Reply with quote

Hello,

While that may be true, it does not answer the question of how to use this data in a calculation. . .
Back to top
View user's profile Send private message
technut

New User


Joined: 27 Dec 2007
Posts: 73
Location: India

PostPosted: Thu Jan 22, 2009 12:57 pm
Reply with quote

The option I thought of, is to convert the file into Numeric using ICEMAN and then printing the sum through an eztrieve.

Code below,
Code:

//STEP01  EXEC  PGM=ICEMAN                                           
//SORTIN   DD  DSN=A024277.TEST.FILE,                                 
//             DISP=SHR                                               
//SORTOUT  DD  DSN=A024277.FILE,                                     
//             DISP=(NEW,CATLG,DELETE),                               
//             UNIT=SYSDA,SPACE=(CYL,(800,200),RLSE),                 
//             DCB=(*.SORTIN)                                         
//SYSOUT   DD  SYSOUT=*                                               
//SYSIN  DD  *                                                       
 SORT FIELDS=COPY                                                     
 INREC BUILD=(1,10,UFF,TO=ZD,LENGTH=10)                               
 OUTREC FIELDS=(1:1,10,ZD)                                           
/*                                                                   
//*********************************************************************
//STEP02   EXEC EZTVCG                                                 
//*********************************************************************
//EZTV.SYSPRINT DD SYSOUT=*                                             
//RCPT     DD DSN=USERID.FILE,                                         
//            DISP=SHR                                                 
//RPTFILE  DD DSN=USERID.TEST.OP,                                     
//            DISP=(NEW,CATLG,DELETE),                                 
//            UNIT=SYSDA,SPACE=(CYL,(800,200),RLSE),                   
//            DCB=(RECFM=FB,LRECL=20,BLKSIZE=0)                         
//SYSIN    DD  *                                                       
*                                                                       
FILE RCPT                                                               
   WS-FIELD                                    1       10     N 1       

FILE RPTFILE PRINTER FB (20 0)                                         
 JOB INPUT (RCPT)                                                       
 PRINT CKIN                                                             
 REPORT CKIN PRINTER RPTFILE NOADJUST LINESIZE 19                       
 CONTROL FINAL                                                   
 SUM WS-FIELD                                                     
 TITLE 1 'SUM REPORT '                                                 
 LINE 01 WS-FIELD                                                     
/*                                                                     


If you dont want to use an Eztrieve, we could just sort-sum using SUM FIELDS in the First STEP itself.

May be, there are alternatives to do this inside easytrieve itself. Probably experts can shed light on better options, if any.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts Store the data for fixed length COBOL Programming 1
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts SCOPE PENDING option -check data DB2 2
Search our Forums:

Back to Top