View previous topic :: View next topic
|
Author |
Message |
vamseepotti
New User
Joined: 21 Oct 2003 Posts: 45
|
|
|
|
How to copy the the first 100 records in sort file in JCL? |
|
Back to top |
|
|
sandip_datta
Active User
Joined: 02 Dec 2003 Posts: 150 Location: Tokyo, Japan
|
|
|
|
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 |
|
|
mdtendulkar
Active User
Joined: 29 Jul 2003 Posts: 237 Location: USA
|
|
|
|
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 |
|
|
rkurapati
New User
Joined: 12 Sep 2006 Posts: 11 Location: vizag
|
|
|
|
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 |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
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 |
|
|
Bitneuker
CICS Moderator
Joined: 07 Nov 2005 Posts: 1104 Location: The Netherlands at Hole 19
|
|
|
|
Hi Ranganath,
Look into IEBGENER.
Why don't we have a forum for utilities? |
|
Back to top |
|
|
rkurapati
New User
Joined: 12 Sep 2006 Posts: 11 Location: vizag
|
|
|
|
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 |
|
|
Bitneuker
CICS Moderator
Joined: 07 Nov 2005 Posts: 1104 Location: The Netherlands at Hole 19
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
|