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

Modifying a data set Using OUTREC..


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

New User


Joined: 10 Oct 2006
Posts: 29

PostPosted: Tue Oct 10, 2006 9:13 pm
Reply with quote

Hello all,

I have one query on OUTREC fields.

One dataset with LRECL '258' is there i have to add two new fields at the end, both are of S9(9). ie; 18bytes will be added and the file LRECL will be increased to 276. The new fields should be filled with zeros, containing a Sign digit.

i have given the SYSIN command as below.

SYSIN DD *
SORT FIELDS =COPY
OUTREC FIELDS=(1:1,258,C'000000000000000000')
*/

The above sysin works but it will fill zeros in the fields, no sign digit were appeared.

How do we give a sign thru OUTREC fields??

it's urgent any one please resond on the same, since it seems to be simple, but i'm not that good in SORT fields.. kindly help me.

Thanks
Ajay.
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 Oct 10, 2006 10:36 pm
Reply with quote

Quote:
The above sysin works but it will fill zeros in the fields, no sign digit were appeared.


S9(9) is a 9-byte ZD field. The sign of F (F0 in the last byte) is valid for ZD, but given what you've said, I guess you want a C sign, not an F sign.

You can use this DFSORT job to get what you want:

Code:

//S1    EXEC  PGM=ICEMAN                                         
//SYSOUT    DD  SYSOUT=*                                         
//SORTIN DD DSN=...  input file                             
//SORTOUT DD DSN=...  output file                                     
//SYSIN    DD    *                                               
  SORT FIELDS=COPY                                               
  OUTREC OVERLAY=(259:+0,TO=ZDC,LENGTH=9,+0,TO=ZDC,LENGTH=9)     
/*
Back to top
View user's profile Send private message
ajay_udl

New User


Joined: 10 Oct 2006
Posts: 29

PostPosted: Wed Oct 11, 2006 2:07 pm
Reply with quote

Thanks for ur quick reply frank, but it still giving a syntax error on OUTREC.

My output file will be having the fields filled with zeros, as shown below.

-----------------
PT-FORFED DISPLAY 00000000{
9/SNUM 0
PT-LATMT DISPLAY 00000000{
9/SNUM 0
-----------------

Actually as per you said 'ZDC' should work, but here OUTREC is creating a syntax error.

It will be helpful if ur gving ur valuable comments on this matter.

Many thanks
Ajay.
Back to top
View user's profile Send private message
ajay_udl

New User


Joined: 10 Oct 2006
Posts: 29

PostPosted: Wed Oct 11, 2006 3:16 pm
Reply with quote

Here i'm using SYNCSORT.

Is that the problem, so that i'm getting syntax error on OUTREC?


"WER268A OUTREC STATEMENT : SYNTAX ERROR "

that was the msg populated in SYSOUT.

IF ur finding any solution please reply.

Thanks
Ajay.
Back to top
View user's profile Send private message
surya_pathaus

Active User


Joined: 28 Aug 2006
Posts: 110

PostPosted: Wed Oct 11, 2006 4:37 pm
Reply with quote

Hi Ajay,

I think in your shop, Overlay is not supported.

You can use the following code:
Slight modification of your code.
Code:

//jobname  JOB ...............   
//*                                               
//STEP001 EXEC PGM=SORT                           
//SORTIN   DD   DSN=input ddname 
//SORTOUT  DD   DSN=output ddname
//SYSIN    DD   *                                 
SORT FIELDS=COPY                                   
OUTREC  FIELDS=(1:1,258,8X'F0',X'C0',8X'F0',X'C0')               
//SORTOUT  DD   SYSOUT=*                           
//SYSOUT   DD   SYSOUT=*                           
Back to top
View user's profile Send private message
ajay_udl

New User


Joined: 10 Oct 2006
Posts: 29

PostPosted: Wed Oct 11, 2006 6:55 pm
Reply with quote

Hai Surya,

First of all the above thing really worked, thanks for ur support.

If my file is of 344 LRECL and i need to add two s9(9) COMP-3 (5bytes each)at the end, the file length will increase to 354.

what will be the sort condition for COMP-3 variable??

I think the procedure would be same, but syntax will be different rt??
I just need to fill zero in those fields.

Could you please help me in this regard.

Thanks
Ajay.
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 Oct 11, 2006 8:41 pm
Reply with quote

Quote:
Thanks for ur quick reply frank, but it still giving a syntax error on OUTREC.


The job works fine with DFSORT.

Quote:
Here i'm using SYNCSORT.

Is that the problem, so that i'm getting syntax error on OUTREC?


Yes, that's the problem.
Back to top
View user's profile Send private message
ajay_udl

New User


Joined: 10 Oct 2006
Posts: 29

PostPosted: Wed Oct 11, 2006 11:59 pm
Reply with quote

Hi Surya,

Can you please provide an update for the above given qtn on Comp-3 varible.?

it would helpful for me if i'm getting an answer from you.

Thanks
Ajay.
Back to top
View user's profile Send private message
surya_pathaus

Active User


Joined: 28 Aug 2006
Posts: 110

PostPosted: Thu Oct 12, 2006 3:39 pm
Reply with quote

ajay,

This is for comp-3.

Code:

OUTREC  FIELDS=(1:1,344,4X'00',X'0C',4X'00',X'0C')
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 Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
No new posts Check data with Exception Table DB2 0
No new posts JCL EXEC PARM data in C Java & MQSeries 2
Search our Forums:

Back to Top