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
 

 

Record number for each record

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Shriram Jogdand

New User


Joined: 14 Oct 2008
Posts: 65
Location: Pune

PostPosted: Thu Aug 11, 2011 5:41 pm    Post subject: Record number for each record
Reply with quote

Hi,

I have one input file(FB,RECL=80). I wanted to number each record in perticular order.
For eg. Suppose records are 10, so I want a give number to records as 1,2,3,1,2,3,1

I/p file
---------
A
B
C
D
E
F
G
H

o/p File
-------------------
A 1
B 2
C 3
D 1
E 2
F 3
G 1
H 2
I 3
J 1

This is because I want to have record with only no. 3 in o/p file which I can achieve with INCLUDE COND once able to give number as above.

Can we do it?
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Aug 11, 2011 5:52 pm    Post subject:
Reply with quote

Maybe this will better serve your needs:

link: http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ice1ca40/3.13?ACTION=MATCHES&REQUEST=SAMPLE&TYPE=EXACTW&SHELF=&DT=20090527161936&CASE=&searchTopic=TOPIC&searchText=TEXT&searchIndex=INDEX&rank=&ScrollTOP=FIRSTHIT#FIRSTHIT

actually, you need to page down (in the above link) to find this:

Quote:
SAMPLE


_____________________________________________________________________
| |
| >>__SAMPLE=_ _n_____ ___________________________________________>< |
| |_(n,m)_| |
| |
|_____________________________________________________________________|

Specifies a sample of OUTFIL input records to be processed for this OUTFIL group. The sample consists of the first m records in every nth interval.

n
specifies the interval size. The value for n starts at 2 (sample every other record) and is limited to 28 digits (15 significant digits).

m
specifies the number of records to be processed in each interval. The value for m starts at 1 (process the first record in each interval) and is limited to 28 digits (15 significant digits). If m is not specified, 1 is used for m. If m is specified, it must be less than n.

Sample Syntax:


* PROCESS RECORDS 1, 6, 11, ...
OUTFIL FNAMES=OUT1,SAMPLE=5

* PROCESS RECORDS 1, 2, 1001, 1002, 2001, 2002 OUTFIL FNAMES=OUT2,SAMPLE=(1000,2),ENDREC=2500

* PROCESS RECORDS 23, 48, 73 OUTFIL FNAMES=OUT3,STARTREC=23,ENDREC=75,SAMPLE=25

* PROCESS RECORDS 1001, 1002, 1003, 1101, 1102, 1103, ... OUTFIL FNAMES=OUT4,STARTREC=1001,SAMPLE=(100,3)

Back to top
View user's profile Send private message
Shriram Jogdand

New User


Joined: 14 Oct 2008
Posts: 65
Location: Pune

PostPosted: Thu Aug 11, 2011 6:05 pm    Post subject: Reply to: Record number for each record
Reply with quote

Thanks dbzTHEdinosauer.

This has really helped me. icon_biggrin.gif
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 Count the length of the record & ... sreekusr DFSORT/ICETOOL 3 Thu Mar 23, 2017 7:52 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts what is meaning of the number in dcl Martylin PL/I & Assembler 2 Thu Mar 09, 2017 7:18 am
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am
No new posts GDG version number PANDU1 JCL & VSAM 4 Sat Mar 04, 2017 8:28 pm


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