MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Ezytrieve GET statement failing

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
bade_miya
Beginner


Joined: 10 Dec 2003
Posts: 110
Topics: 38

PostPosted: Fri Nov 11, 2005 6:30 am    Post subject: Ezytrieve GET statement failing Reply with quote

Hi all,
I am executing the following ezytrieve for calculating totals of a packed field and writing it into another output file. The get statement is failing. The line after GET INFILE is the error i am getting. If i use goto job, the code is working, but in that case, after end of file, the code below do while is not executing. Please help me out. Also please let me know if there is a sort solution for this.

Input file
----------
field1==>(alphanum 8-bytes)
field2==>(packed 5-bytes with 2 decimal points)

Output file
------------
Edited field to display totals of field 2 (13 bytes)

Ezytrieve Code
-----------------
[code:1:2fcad89df5]
FILE INFILE
EMP-NUMBER 01 08 A
DISCOUNT-AMNT 09 05 P 2 MASK '-,---,--9.99'
*
FILE TOTALSFL FB(13 0)
TOTAL-DISCOUNT 01 13 N 2 MASK '--,---,---,--9.99'
*
DUMMY W 1 A
WS-TOTALS W 13 N 2
*
JOB INPUT INFILE
*
DO WHILE NOT EOF INFILE
IF ((EMP-NUMBER
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Fri Nov 11, 2005 8:08 am    Post subject: Reply with quote

bademiya,

When your using SFP (syncronised file processing) you don't have to use the GET statement. Your code is as simple as this.

[code:1:683899fe71]
JOB INPUT INFILE FINISH EOJ-REPORT

IF EMP-NUMBER
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
bade_miya
Beginner


Joined: 10 Dec 2003
Posts: 110
Topics: 38

PostPosted: Fri Nov 11, 2005 8:17 am    Post subject: Reply with quote

Hi Kolusu,
Thanks for the quick reply. But is there any way to get the output as say 123456.78 in my output file. If the mask will not work, is there any alternative for this? Also please let me know if there is a sort solution for this.

Thanks
bade_miya
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Fri Nov 11, 2005 8:47 am    Post subject: Reply with quote

Quote:

But is there any way to get the output as say 123456.78 in my output file. If the mask will not work, is there any alternative for this?


Bade_miya,

why not write as a report ?

Quote:

Also please let me know if there is a sort solution for this.


Try this .

Code:

//SYSIN    DD *                                   
  OMIT COND=(1,8,CH,EQ,C'00000000',OR,             
             1,8,CH,EQ,C'99999999')               
  INREC FIELDS=(C'1',9,5)                         
  SORT FIELDS=(1,1,CH,A)                           
  SUM FIELDS=(2,5,PD)                             
  OUTREC FIELDS=(2,5,PD,EDIT=(II,III,III,IIT.TT)) 


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Fri Nov 11, 2005 9:07 am    Post subject: Reply with quote

bade_miya,

Easytrieve Reporting code:

[code:1:1066a61f9e]
//TOTALSFL DD DSN=YOUR SUM REPORT,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(TRK,(1,1),RLSE),
// DCB=(RECFM=FB,LRECL=16,BLKSIZE=0)
//*
//SYSIN DD *

FILE INFILE
EMP-NUMBER 01 08 A
DISCOUNT-AMNT 09 05 P 2

FILE TOTALSFL PRINTER

JOB INPUT INFILE

IF EMP-NUMBER
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
bade_miya
Beginner


Joined: 10 Dec 2003
Posts: 110
Topics: 38

PostPosted: Fri Nov 11, 2005 10:07 am    Post subject: Reply with quote

Hi Kolusu,
Thank you so much for that. You always give people more than they expect. Smile


Thanks & Regards
Bade_miya
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group