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
 

 

Find total number of records for a paticular id

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Find total number of records for a paticular id
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 Moderator


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

PostPosted: Fri Apr 23, 2010 10:07 pm    Post subject:
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

Site Director


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

PostPosted: Fri Apr 23, 2010 10:07 pm    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Fri Apr 23, 2010 11:31 pm    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Fri Apr 23, 2010 11:35 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts DSNACCOX (can it be run on 1 db/ts, t... SRICOBSAS DB2 3 Sat May 06, 2017 12:59 am
No new posts SMTP the current generation number of... Jyothi Kulunde JCL & VSAM 4 Thu May 04, 2017 4:08 pm
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am


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