Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to get record numbers?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: How to get record numbers?
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: 1288
Location: Chennai, India

PostPosted: Wed Jul 16, 2008 12:09 pm    Post subject: Reply to: How to get record numbers?
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    Post subject: Reply to: How to get record numbers?
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    Post subject: Reply to: How to get record numbers?
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    Post subject: Reply to: How to get record numbers?
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 Moderator


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

PostPosted: Wed Jul 16, 2008 8:57 pm    Post subject:
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    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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Repeat part of record multiple times Learncoholic DFSORT/ICETOOL 4 Tue Aug 29, 2017 11:33 am
No new posts Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 6 Wed Jul 26, 2017 7:35 pm
No new posts Need to write record of PS File in ex... Chandan1993 JCL & VSAM 1 Wed Jun 07, 2017 1:35 am

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