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

Find total number of records for a paticular id


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
baljinders

New User


Joined: 21 Aug 2006
Posts: 72

PostPosted: Fri Apr 23, 2010 9:46 pm
Reply with quote

I need to find the total number of records for a particular id in a huge PS file variable length. The issure here is the the field location for that ID is not fixed. There are 50 occurances of the defined field and a particualr id say 45 can be in any of the occurences.
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: Fri Apr 23, 2010 10:07 pm
Reply with quote

Your description of the input records is too vague for anyone to give you a general solution. You need to do a better job of describing what you're trying to do exactly.

Please show an example of the records in your input file (relevant fields only) and what you expect for output. Explain the "rules" for getting from input to output. Give the starting position, length and format of each relevant field. Give the RECFM and LRECL of the input files. Cover all relevant variations in your example.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Fri Apr 23, 2010 10:07 pm
Reply with quote

Hello,

Show some sample input and the output you want from that input.

Mention any "rules". Mention the dsorg and lrecl of the files.
Back to top
View user's profile Send private message
baljinders

New User


Joined: 21 Aug 2006
Posts: 72

PostPosted: Fri Apr 23, 2010 11:28 pm
Reply with quote

copy book field:

Code:
02  WS-OCCURS-TRADE OCCURS 0 TO 30 TIMES             
                      DEPENDING ON WS-NBR
                      INDEXED BY WS-CNT.               
      10  WS-INPUT-DATA               PIC X(30).     
                                                       
      10  WS-DAY-TRADE REDEFINES WS-INPUT-DATA.     
          15  WS- DAY-TRADE -TYPE           PIC S999 COMP-3.
          15  WS-DIV                           PIC X(28).     

10  WS-DAILY-TRADE REDEFINES IP-INPUT-DATA.     
    15  WS- DAILY-TRADE -TYPE       PIC S999 COMP-3.   
        88  WS-TRADE-TYP            VALUE +50.     
   15  WS- RES                              PIC X(28)

and rest of the fields which get redeinded the same way

I need to find out all the records in the input file that have value 50 in WS-TRADE-TYP.
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: Fri Apr 23, 2010 11:31 pm
Reply with quote

Sorry, but I don't speak COBOL. Please provide the information asked for in the form asked for.
Back to top
View user's profile Send private message
baljinders

New User


Joined: 21 Aug 2006
Posts: 72

PostPosted: Fri Apr 23, 2010 11:32 pm
Reply with quote

LRECL of input file = 3500, 1st 500 are fixed records
RECFM= VBS

WS-NBR field also appears in a 2nd file. I need to fetch records from input file based on matching the ws-nbr in 2nd file and ws-trade-typ.
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: Fri Apr 23, 2010 11:35 pm
Reply with quote

Again:

Quote:
Please show an example of the records in your input file (relevant fields only) and what you expect for output. Give the starting position, length and format of each relevant field.
Back to top
View user's profile Send private message
baljinders

New User


Joined: 21 Aug 2006
Posts: 72

PostPosted: Sat Apr 24, 2010 11:00 pm
Reply with quote

I was able to get what i wanted using a cobol program. Sorry for not so clear description of the problem because if was written in a hurry plus it was also half clear to me at that time.

Thanks 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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Substring number between 2 characters... DFSORT/ICETOOL 2
No new posts To find whether record count are true... DFSORT/ICETOOL 6
Search our Forums:

Back to Top