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
 
Input is masked..how to declare this data to find totals

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
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    Post subject: Input is masked..how to declare this data to find totals
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    Post subject: Reply to: Input is masked..how to declare this data to find
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

Site Director


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

PostPosted: Wed Jan 21, 2009 9:20 pm    Post subject:
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    Post subject: Reply to: Input is masked..how to declare this data to find
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    IBMMAINFRAMES.com Support Forums -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Question related to Data dictionary f... rexx77 SYNCSORT 3 Thu Aug 31, 2017 7:23 am
No new posts SORT Trailer Count - LRECL Output co... amorante DFSORT/ICETOOL 5 Tue Aug 29, 2017 8:57 pm
No new posts Extract Data till prev hour balaji81_k DB2 16 Fri Aug 25, 2017 9:25 pm
No new posts FTP data transfer from PC to Mainfram... AJAYREDDY All Other Mainframe Topics 8 Wed Aug 23, 2017 9:59 pm
No new posts Command to find TMEMBER name for a TPIPE Siva NKK Kothamasu IMS DB/DC 0 Wed Aug 16, 2017 6:08 pm

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