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

Sort first 100 records of a file in JCL?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vamseepotti

New User


Joined: 21 Oct 2003
Posts: 45

PostPosted: Fri Feb 20, 2004 3:23 pm
Reply with quote

icon_rolleyes.gif How to copy the the first 100 records in sort file in JCL?
Back to top
View user's profile Send private message
sandip_datta

Active User


Joined: 02 Dec 2003
Posts: 150
Location: Tokyo, Japan

PostPosted: Fri Feb 20, 2004 3:48 pm
Reply with quote

It can easily be done by IDCAMS and lot of other method.
Code:
//STEP01   EXEC PGM=IDCAMS
//SYSPRINT DD   SYSOUT=*
//SYSOUT   DD   SYSOUT=*
//IN       DD   DSN=Input DSN,DISP=SHR
//OUT      DD   DSN=Output DSN,DISP=SHR
//SYSIN    DD   *
      REPRO -
         INFILE(IN) -
         OUTFILE(OUT) -
         COUNT(100)
/*

Regards,
Sandip.
Back to top
View user's profile Send private message
mdtendulkar

Active User


Joined: 29 Jul 2003
Posts: 237
Location: USA

PostPosted: Fri Feb 20, 2004 4:28 pm
Reply with quote

Hello amseepotti,

You can also use the STOPAFT parameter of your SORT utility as follows:

Code:

//STEP01   EXEC PGM=SORT
//SYSOUT   DD   SYSOUT=*
//IN       DD   DSN=Input_dsn,DISP=SHR
//OUT      DD   DSN=Output_dsn,DISP=SHR
//SYSIN    DD   *
   OPTION=COPY,STOPAFT=100
/*


Hope this helps,

Regards
Mayuresh Tendulkar
Back to top
View user's profile Send private message
rkurapati

New User


Joined: 12 Sep 2006
Posts: 11
Location: vizag

PostPosted: Tue Jan 02, 2007 4:09 pm
Reply with quote

Hi,

I need some help as below..

Requirement:-

I need to initialize a field in a file which is at posiotion 400. The actual length of the file is 500.

Could some one help me out.

Thanks,
Ranganath
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Tue Jan 02, 2007 4:13 pm
Reply with quote

Hi rkurapati,

Quote:
I need to initialize a field in a file which is at position 400. The actual length of the file is 500.


What do u mean by that do u want to move spaces for this field in all the records of the file.
Please elaborate ur question by giving in i/p & o/p

Please start a new thread for new topic
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Tue Jan 02, 2007 4:18 pm
Reply with quote

Hi Ranganath,

Look into IEBGENER.

Why don't we have a forum for utilities?
Back to top
View user's profile Send private message
rkurapati

New User


Joined: 12 Sep 2006
Posts: 11
Location: vizag

PostPosted: Tue Jan 02, 2007 4:21 pm
Reply with quote

Hi Gupta,

The actual problem here is

I have a file called ---t.xxx.abc

and i have changed the length of file from 400 to 500

As i have made the length change the new file will have spaces in the 400 to 500 position.

I need to initialize to zeroes if the field is numeric and spaces to alpha numeric field.

Thanks,
Ranganath.
The field is having spaces , we need to change the field to numeric.
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Tue Jan 02, 2007 5:33 pm
Reply with quote

Hi once more,

Did you take the time to have a quick look at this example of IEBGENER which definitely solves your problem?
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: Tue Jan 02, 2007 10:18 pm
Reply with quote

Quote:
and i have changed the length of file from 400 to 500

As i have made the length change the new file will have spaces in the 400 to 500 position.

I need to initialize to zeroes if the field is numeric and spaces to alpha numeric field.


It's not clear what you want to do. What is the starting position and length of the field you want to check for numerics or non-numerics? Does the field have '0'-'9' for numerics or something else (e.g. PD numerics)?

Do you want to put zeroes in positions 401-500 if that field is numeric, and spaces in positions 401-500 if that field is non-numeric? What type of zeroes do you want (binary zeros, '0's, something else)?
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
Search our Forums:

Back to Top