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

Utility to find the count in a PS File


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sathyaraj

New User


Joined: 28 Sep 2007
Posts: 71
Location: India.

PostPosted: Tue Nov 06, 2007 8:58 pm
Reply with quote

Hi Frank..
Am at the verge of completing my task and am waiting to get the solution from you.. Can you please suggest me with some idea..?
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue Nov 06, 2007 10:26 pm
Reply with quote

Sorry, I missed your post on 11/01.

If you want a sequence number, you can add an OUTREC statement like this:

Code:

  OUTREC OVERLAY=(51:SEQNUM,3,ZD)


and then use that sequence number in the TRAILER3 -

Code:

    TRAILER3=(51,3,...
Back to top
View user's profile Send private message
sathyaraj

New User


Joined: 28 Sep 2007
Posts: 71
Location: India.

PostPosted: Tue Nov 06, 2007 11:05 pm
Reply with quote

HI..

I tried to use the logic... but something went wrong badly... am getting such an O/P
Code:

0528. 0035664    =       64   |     125
9147. 0036805    =    83948   |   64671
4689. 0037625    =     5853   |    9689
5837. 0037868    =      485   |     663

Can you plz tell me why its happening this way..?
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue Nov 06, 2007 11:38 pm
Reply with quote

Hmmm ... it's been so long, I forgot what we were doing. I guess we're creating trailer records and so you need sequence numbers for the trailer records rather than for the output records. TRAILERx doesn't allow SEQNUM, so I guess you'll have to run the output of the original report back through DFSORT to add the sequence numbers.

So the step to produce the report with the trailer records would have a temp file as its output and you'd use that for input to another step that would have:

Code:

   INREC BUILD=(SEQNUM,3,ZD,1,n)


or you could leave room for the SEQNUM in the first step with TRAILER3=(5:...) and then use this in the second step:

Code:

   INREC OVERLAY=(1:SEQNUM,3,ZD)
Back to top
View user's profile Send private message
sathyaraj

New User


Joined: 28 Sep 2007
Posts: 71
Location: India.

PostPosted: Wed Nov 07, 2007 12:04 am
Reply with quote

K..I ll give a try.. Actually the purpose of numbering is to find the number of records in teh final O/P..

So i tried to do it this way..

Code:

INREC IFTHEN=(WHEN=INIT,OVERLAY=(236:C'0',249:C'1')),               
      IFTHEN=(WHEN=(195,2,CH,EQ,C'EE'),OVERLAY=(236:C'1',249:C'0')),
      IFTHEN=(WHEN=(195,2,CH,EQ,C'RR'),OVERLAY=(236:C'1',249:C'0'))
SORT FIELDS=(1,7,CH,A)                                             
OUTREC IFTHEN=(WHEN=INIT,OVERLAY=(250:C'0')),                       
       IFTHEN=(WHEN=(1,2,CH,EQ,C'  ',AND,7,1,CH,NE,C' '),           
                                       OVERLAY=(250:C'1'))         
OUTFIL REMOVECC,NODETAIL,                                           
  HEADER1=(2:'CUSTOMER NUMBER ',25:'EMP',31:'|',37:'DEP',/,         
  1:'---------------------------------------',/,                   
    'NUMBER OF CUSTOMERS =',TOT=(250,1,ZD,M10,LENGTH=4),/,
____________________________         
  1:'---------------------------------------'),                     
  BUILD=(80X),                                                     
  SECTIONS=(1,7,                                                   
  TRAILER3=('  ',1,7,'    = ',                                     
    20:TOT=(236,1,ZD,M10,LENGTH=8),'   |',                         
    32:TOT=(249,1,ZD,M10,LENGTH=8)))                               


And its giving ICE223A F REPORT FIELD ERROR

Cant we use the overlay in the OUTREC to find the count of the O/P file..

I have given an underscore where the error msg is thrown..
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Nov 07, 2007 1:42 am
Reply with quote

The ICE223A points to TOT in HEADER1. TOT can only be used in TRAILERx, not in HEADERx.
Back to top
View user's profile Send private message
sathyaraj

New User


Joined: 28 Sep 2007
Posts: 71
Location: India.

PostPosted: Wed Nov 07, 2007 3:21 am
Reply with quote

Yes.. Thats working great.. Thnx a lot for your tremendous support..

Got a great learning from Frank.. Thnx once again.
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 -> JCL & VSAM Goto page Previous  1, 2

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top