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
 

 

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 Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 0 Mon Jan 02, 2017 11:16 am
No new posts JES2 JEC: Use UNIX Pipes to Pass Data... Virendra Shambharkar JCL & VSAM 21 Tue Dec 20, 2016 6:55 pm
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm


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