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
 

 

SyncSort card required to expand in between field of a file.
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
ajay_udl

New User


Joined: 10 Oct 2006
Posts: 29

PostPosted: Sun Sep 28, 2008 5:10 pm    Post subject: SyncSort card required to expand in between field of a file.
Reply with quote

Hi All,

I have got a file whose LRECL is 2133. One of the in btw field which is X(15) starting at position 2104 and ends at 2118, needs to be expanded to X(19), with expanded 4 bytes with zeros. So the new start and end position of the field would be from 2104 to 2122.

Please suggest a sort card to expand the field, so that the Lrecl of the file will be changed from 2133 to 2137. I suppose OUTREC would serve the purpose.

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

Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Sun Sep 28, 2008 5:16 pm    Post subject:
Reply with quote

OUTREC FIELDS=(1,2118,4Z,2119,14)
Back to top
View user's profile Send private message
ajay_udl

New User


Joined: 10 Oct 2006
Posts: 29

PostPosted: Sun Sep 28, 2008 7:56 pm    Post subject: Reply to: Sort card required to expand an in between field o
Reply with quote

Hi Sambhoji,

Thanks a lot for the quick reply.
Rather than populating zeros, is it possible to put in spaces in those 4 bytes?.

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

Moderator


Joined: 17 Oct 2006
Posts: 2168
Location: @my desk

PostPosted: Sun Sep 28, 2008 8:14 pm    Post subject:
Reply with quote

Quote:
Rather than populating zeros, is it possible to put in spaces in those 4 bytes?.

Yes. You can put '4X' to put 4 spaces.
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Mon Sep 29, 2008 11:43 am    Post subject:
Reply with quote

Quote:

Rather than populating zeros, is it possible to put in spaces in those 4 bytes?.

Yes it is possible by solution suggested by Arun.
Also you can do as
OUTREC FIELDS=(1,2118,2123:2119,14)

characters 2119 to 2122 will get automatically filled with spaces
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon Sep 29, 2008 12:49 pm    Post subject:
Reply with quote

Sambhaji wrote:
.. will get automatically filled with spaces
Is not it site specific ? I recall that with DFSORT it's X'40' but how about SyncSort ? And do they keep changing such defaults across shops or are they same always ?
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Sep 29, 2008 11:54 pm    Post subject:
Reply with quote

Hello,

If things are actually specified, there is no need to wonder about product/site defaults.

Many organizations have standards that require all positions to be specifically filled so than anyone looking at the control statements can have no doubt as to what the output contains.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Sep 30, 2008 10:00 am    Post subject:
Reply with quote

HI Dick,

I didn't wonder it's a curiosity rather..
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Tue Sep 30, 2008 10:57 am    Post subject:
Reply with quote

Quote:
Is not it site specific ?

I dont think so because at
Here
I read below
Quote:

Specifying c:X as your last field is an easy way to increase the record length of your output records to c bytes. For example, if you want to create 80-byte output records containing the first 30 bytes of your input records padded with blanks, you can use this OUTREC statement:
OUTREC BUILD=(1,30,80:X)
DFSORT automatically sets LRECL=80 for the SORTOUT data set if you do not override the LRECL.
Back to top
View user's profile Send private message
ajay_udl

New User


Joined: 10 Oct 2006
Posts: 29

PostPosted: Thu Oct 02, 2008 4:59 am    Post subject: Reply to: Sort card required to expand an in between field o
Reply with quote

HI All,

Thanks for your replies.
Now the issue is with a file which is VB(variable block).
The size of a file is shown a 2123 for lrecl. but when u go inside the file you can see the file ending at 2119.

If u consider it as a FB the field to be expanded ends at 2108, and I have to put 4 spaces after that and then the remaining fields should come.

I wanted the VB file to have lrecl as 2127.

I followed the below method which does not seems to be working:

1.
sort fields=copy
outrec=(1,2108,4X,2109,11)

2.
sort fields=copy
outrec=(1,2112,4X,2113,11)

All these not seems to be working. can any one help me pls.

Thanks
Ajay/C
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Oct 02, 2008 5:07 am    Post subject:
Reply with quote

Hello,

Quote:
All these not seems to be working. can any one help me pls.
Posting that it doesn't work provids nothing for any here to use to help you. You need to clarify what "not working" means for each case.

It may help if you view the output fles online and copy/paste some of the data (beginning with pos 1). When you copy/paste the data, use the "Code" tag near the top of the reply panel. Use Preview to verify that your post appears the way you want, then Submit.

When you work with variable length data, you must account for the 4 positons used by the rdw.
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: Thu Oct 02, 2008 5:39 am    Post subject:
Reply with quote

Quote:
Now the issue is with a file which is VB(variable block).
The size of a file is shown a 2123 for lrecl. but when u go inside the file you can see the file ending at 2119.

If u consider it as a FB the field to be expanded ends at 2108, and I have to put 4 spaces after that and then the remaining fields should come.

I wanted the VB file to have lrecl as 2127.


Ajay,

Here's a DFSORT job that will do what you described:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (VB/2123)
//SORTOUT DD DSN=...  output file (VB/2127)
//SYSIN    DD    *
  SORT FIELDS=COPY
  OUTREC BUILD=(1,2108,4X,2109)
/*


Note that 2109 means copy the bytes from position 2109 to the end of the record. That's how you handle variable length records.
Back to top
View user's profile Send private message
ajay_udl

New User


Joined: 10 Oct 2006
Posts: 29

PostPosted: Thu Oct 02, 2008 5:51 am    Post subject: Reply to: Sort card required to expand an in between field o
Reply with quote

Hi Dick,

Sorry to make you confused.

Actually I have a VB file which is of Lrecl=2123
which needs to be expanded to 2127 after adding 4 byte spaces in between the file.

The field which needs an expansion ends at 2108, so I want 4 spaces after this field and then the remaining fields should appear as is in outout file.

Please let me know whether this is possible.

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

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Thu Oct 02, 2008 5:58 am    Post subject:
Reply with quote

Hi Frank,

what happens when you encounter short records ?

ie.

Code:
ICE218A 6 99 BYTE VARIABLE RECORD IS SHORTER THAN 100 BYTE MINIMUM FOR


I tried this on a VB file with an LRECL of 133

Code:
OUTREC BUILD=(1,100,4X,101)



Gerry
Back to top
View user's profile Send private message
ajay_udl

New User


Joined: 10 Oct 2006
Posts: 29

PostPosted: Thu Oct 02, 2008 6:23 am    Post subject: Reply to: Sort card required to expand an in between field o
Reply with quote

Hi Frank,

It does not seems to be working.

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

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Thu Oct 02, 2008 6:27 am    Post subject:
Reply with quote

Hi,

maybe this
Code:
  OUTREC BUILD=(1,2108,4X,2109)


can only apply to records GE 2113 bytes long.


Gerry
Back to top
View user's profile Send private message
ajay_udl

New User


Joined: 10 Oct 2006
Posts: 29

PostPosted: Thu Oct 02, 2008 6:37 am    Post subject: Reply to: Sort card required to expand an in between field o
Reply with quote

Can any one explain what is RDW related to VB file.?
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Thu Oct 02, 2008 6:48 am    Post subject:
Reply with quote

Hi Ajay,

see Type_Description_Herehttp://ibmmainframes.com/viewtopic.php?t=34145&highlight=rdw


Gerry
Back to top
View user's profile Send private message
ajay_udl

New User


Joined: 10 Oct 2006
Posts: 29

PostPosted: Thu Oct 02, 2008 7:01 am    Post subject: Reply to: Sort card required to expand an in between field o
Reply with quote

HI All,

Any one have idea about my previous query?
How to sort a VB file with Outrec?

Thanks
AJAY.
Back to top
View user's profile Send private message
ajay_udl

New User


Joined: 10 Oct 2006
Posts: 29

PostPosted: Thu Oct 02, 2008 7:26 am    Post subject: Reply to: Sort card required to expand an in between field o
Reply with quote

Hi all,

input file lrecl=2123 (VB)
Output file required lrecl=2127 (VB)
starting from 2113 to 2116 require spaces.

When I'm running the job with below sysin:

//SYSIN DD *
SORT FIELDS=COPY
OUTREC FIELDS=(5,2112,2117:2113,11)
/*

I'm getting an abend : outrec RDW not included.
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 -> JCL & VSAM All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 22 Tue Dec 06, 2016 8:04 pm
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


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