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

How to get record numbers?


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

New User


Joined: 17 Oct 2006
Posts: 32

PostPosted: Wed Jul 16, 2008 12:06 pm
Reply with quote

Hi,

I want to get the number of records from one file and move that value into a field in another file (with a different layout).

Will it be possible to do it thru JCL?

Thanks - Raghav
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Wed Jul 16, 2008 12:09 pm
Reply with quote

rag,

Quote:
Will it be possible to do it thru JCL?


Yes, it is possible. Search the DFSORT forum for "COUNT".
Back to top
View user's profile Send private message
raghavendra_p_sarvade

New User


Joined: 17 Oct 2006
Posts: 32

PostPosted: Wed Jul 16, 2008 12:28 pm
Reply with quote

Thans Aaru.

I could see COUNT options which just writes out a file with just record count in that.

But I have to not just take the record count, but populate that into another file (which has a different layout) with data.

Can you help?

Thanks - Raghav
Back to top
View user's profile Send private message
Prasanthhere

Active User


Joined: 03 Aug 2005
Posts: 306

PostPosted: Wed Jul 16, 2008 12:36 pm
Reply with quote

You mean to copy the data as well as the record count
Back to top
View user's profile Send private message
raghavendra_p_sarvade

New User


Joined: 17 Oct 2006
Posts: 32

PostPosted: Wed Jul 16, 2008 12:40 pm
Reply with quote

hi..

I dont need to copy the records from the file. I just need to get the record count.

That record count has to go into another file with a different layout and data.

Thanks - Raghav
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 Jul 16, 2008 8:57 pm
Reply with quote

You can create a DFSORT Symbol with the count of records and use the Symbol for a field in another file. Here's an example:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file1
//SORTOUT DD DSN=&&S1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//SYSIN    DD    *
  OPTION COPY
* Create a DFSORT symbol as follows:
* CT,'dddddddd'
* where dddddddd is the count of records in the input file.
  OUTFIL REMOVECC,NODETAIL,
    BUILD=(80X),
    TRAILER1=('CT,''',COUNT=(M11,LENGTH=8),'''')
/*
//S2  EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SYMNAMES DD DSN=&&S1,DISP=(OLD,PASS)
//SORTIN DD DSN=...  input file2
//SORTOUT DD DSN=...  output file
//SYSIN    DD    *
  OPTION COPY
* Use the CT symbol for the count.
  INREC OVERLAY=(11:CT)
/*
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 How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
Search our Forums:

Back to Top