Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Utility to find the count in a PS File
Goto page Previous  1, 2
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
sathyaraj

New User


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

PostPosted: Wed Oct 31, 2007 1:31 am    Post subject:
Reply with quote

That code was really mind blowing.. the logic that has been employed was more impressive than the utility itself.. That '0' & '1' Thing...

Am really felling good about joining this forum.. Wish to have a long run... icon_smile.gif
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


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

PostPosted: Wed Oct 31, 2007 2:02 am    Post subject:
Reply with quote

Quote:
the logic that has been employed was more impressive than the utility itself


More impressive than DFSORT? You obviously haven't explored much of what DFSORT/ICETOOL offers. It's extremely impressive if I do so say myself. icon_wink.gif
Back to top
View user's profile Send private message
sathyaraj

New User


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

PostPosted: Wed Oct 31, 2007 11:06 pm    Post subject:
Reply with quote

Hi Frank..

Got one more modification in the requirement.. is there anyway to give the serial number for the records?
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


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

PostPosted: Wed Oct 31, 2007 11:17 pm    Post subject:
Reply with quote

Quote:
is there anyway to give the serial number for the records


It's not clear what you mean by "serial number" or where it would fit into your report. Do you mean "sequence number"? Please explain what you want more clearly. Show an example of the output you want including the "serial number".
Back to top
View user's profile Send private message
sathyaraj

New User


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

PostPosted: Thu Nov 01, 2007 12:05 am    Post subject:
Reply with quote

Code:

1.NO OF EMP RECORDS WITH IPLAN IND 7      =    1215355
2.NO OF DEP RECORDS WITH IPLAN IND 7      =    1675400 2.
3.NO OF EMP RECORDS WITH IPLAN IND 6      =     191698
4.NO OF DEP RECORDS WITH IPLAN IND 6      =     373431
5.NO OF EMP RECORDS WITH IPLAN IND 5      =    1696575
6.NO OF DEP RECORDS WITH IPLAN IND 5      =    2411017
1.NO OF DEP RECORDS FOR CUSTOMER  0002284 =       7200
2.NO OF EMP RECORDS FOR CUSTOMER  0002284 =       3519
3.NO OF DEP RECORDS FOR CUSTOMER  0006472 =       1668
4.NO OF EMP RECORDS FOR CUSTOMER  0006472 =       2096


Please let me know if this explains the requiremet....
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 8:58 pm    Post subject:
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 Moderator


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

PostPosted: Tue Nov 06, 2007 10:26 pm    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Tue Nov 06, 2007 11:38 pm    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Wed Nov 07, 2007 1:42 am    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts File transfer issue with end of line ... VINAY PALLELA TSO/ISPF 4 Thu Nov 14, 2019 12:01 am
No new posts Count From Multiple Inputs Tyler Dunbar DFSORT/ICETOOL 5 Tue Nov 12, 2019 1:07 am
No new posts File compare, where file has header a... VINAY PALLELA SYNCSORT 8 Thu Nov 07, 2019 5:05 pm
No new posts OMIT first and last column of a pipe-... karthikb_itpro DFSORT/ICETOOL 1 Fri Nov 01, 2019 8:24 pm
No new posts How to place name of the file where t... danielgp89 SYNCSORT 18 Thu Oct 17, 2019 12:55 am

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