MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How do we create a different record length file?

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
subho
Beginner


Joined: 19 Oct 2004
Posts: 13
Topics: 4
Location: Atlanta

PostPosted: Tue Nov 16, 2004 1:24 pm    Post subject: How do we create a different record length file? Reply with quote

I have searched in this forum but couldn't find it. Sad How do we create a dataset from another dataset, which will have just one byte extra? For an example, I have a file with Record Length 105. I want to create a file with same information, but record length of 106. The last byte(106th byte) would be space.
I can use SYNCSORT in my system.

Thanks in advance,
Subho
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12377
Topics: 75
Location: San Jose

PostPosted: Tue Nov 16, 2004 1:43 pm    Post subject: Reply with quote

Subho,

Try this JCL

Code:

//STEP0100 EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD DSN=YOUR 105 LRECL FILE,
//            DISP=SHR
//SORTOUT  DD DSN=YOUR 106 LRECL FILE,
//            DISP=(NEW,CATLG,DELETE),
//            UNIT=SYSDA,
//            SPACE=(CYL,(X,Y),RLSE)
//SYSIN    DD *
   SORT FIELDS=COPY
   OUTREC FIELDS=(1,105,   $ COPY FIRST 105 BYTES AS IS
                  X)       $ PUT A SPACE IN 106TH BYTE
/*

_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
subho
Beginner


Joined: 19 Oct 2004
Posts: 13
Topics: 4
Location: Atlanta

PostPosted: Tue Nov 16, 2004 1:58 pm    Post subject: Reply with quote

It worked!!! woow.. Very Happy Thanks a lot!!

Subho
Back to top
View user's profile Send private message
subho
Beginner


Joined: 19 Oct 2004
Posts: 13
Topics: 4
Location: Atlanta

PostPosted: Tue Nov 16, 2004 3:19 pm    Post subject: Reply with quote

In addition to this issue, how can we have a different length output file where additional field is in between? For an example record length of input file is 90. Output file will have record length of 91 with exact same data. But the column number 55 for all output records will have space.

Input file:
AAABBBCCC
AAACCCBBB

Output file:
AAAB BBCCC
AAAC CCBBB

Thanks,
Subho
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12377
Topics: 75
Location: San Jose

PostPosted: Tue Nov 16, 2004 3:30 pm    Post subject: Reply with quote

Subho,

Try this

Code:

//STEP0100 EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD DSN=YOUR 90 LRECL FILE,
//            DISP=SHR
//SORTOUT  DD DSN=YOUR 91 LRECL FILE,
//            DISP=(NEW,CATLG,DELETE),
//            UNIT=SYSDA,
//            SPACE=(CYL,(X,Y),RLSE)
//SYSIN    DD *
   SORT FIELDS=COPY
   OUTREC FIELDS=(1,54,    $ COPY FIRST 54 BYTES AS IS
                  X,       $ PUT A SPACE IN 55th BYTE
                  55,36)   $ COPY 55 THRU 90 BYTES
/*


Hope this helps...

Cheers

kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
subho
Beginner


Joined: 19 Oct 2004
Posts: 13
Topics: 4
Location: Atlanta

PostPosted: Tue Nov 16, 2004 4:21 pm    Post subject: Reply with quote

Thanks a lot!! It's working PERFECT!!

Thanks again,
Subho
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group