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 

iebgener copy sysut1 instread to susut2 recl greater than 80

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


Joined: 15 Jul 2004
Posts: 95
Topics: 11
Location: Edison,NJ

PostPosted: Tue Jan 25, 2005 9:45 am    Post subject: iebgener copy sysut1 instread to susut2 recl greater than 80 Reply with quote

Code:

//JUMSB4G JOB B55246CV70772,'XXXXXX',NOTIFY=JUMSB4,MSGCLASS=T,CLASS=F
//*
//IEBGEN  EXEC PGM=IEBGENER
//*
//*SYSUT1   DD DSN=FM.SORTED.EXTRACT.FV(0),DISP=SHR
//SYSUT1   DD *
123456789A123456789B123456789C123456789D123456789E123456789F123456789G123456789H
123456789A123456789B
//*
//*SYSUT2   DD SYSOUT=(G,,STD),DCB=(LRECL=80,BLKSIZE=800,RECFM=FB)
//SYSUT2   DD DSN=JUMSB4.IEBGENER.TEST,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSIN    DD DUMMY


Quote:
This is my JCL. I want to copy a line greater than 80 bytes long into a single line in output file. output file record Lenght is 160 and variable. I dont get any abends. but the output file has first 80 bytes in first line of output file i.e. 123456789A123456789B123456789C123456789D123456789E123456789F123456789G123456789H
and
next line has this 123456789A123456789B
I want all of them in same line. Is this possible ? How do we do this.

_________________
Vivek,NJ

Db2,IDMS
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
kolusu
Site Admin
Site Admin


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

PostPosted: Tue Jan 25, 2005 9:53 am    Post subject: Reply with quote

Vivek,

You can do that with a blksize override trick. Inorder to do that you need to know the exact no: of records and manipulate the blocksizes.

Take a look at the 7th post from bottom (posted by me ) which uses a similar trick

http://www.mvsforums.com/helpboards/viewtopic.php?t=3376

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
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Tue Jan 25, 2005 10:08 am    Post subject: Reply with quote

I went with a SORT solution using the FTOV conversion:
Code:

//*
//STEP0002 EXEC PGM=SORT
//SORTIN   DD   *
123456789A123456789B123456789C123456789D123456789E123456789F123456789G123456789H123456789A123456789B
/*
//SORTOUT  DD   DSN=&SYSUID..MY.DATA,
//         DISP=(,CATLG,DELETE),UNIT=SYSDA,
//         SPACE=(CYL,(1,1),RLSE)
//SYSOUT   DD   SYSOUT=*
//SYSIN    DD   *
  OPTION COPY
  OUTFIL FTOV,OUTREC=(1:1,156)
/*
//*

Note: my JCL PDS is RECFM=FB LRECL=254.
Back to top
View user's profile Send private message
vivek
Beginner


Joined: 15 Jul 2004
Posts: 95
Topics: 11
Location: Edison,NJ

PostPosted: Tue Jan 25, 2005 10:11 am    Post subject: Reply with quote

Superk, I have a JCL member which is 80 bytes long. I have to break 81st input field into next line in sysin.
_________________
Vivek,NJ

Db2,IDMS
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
vivek
Beginner


Joined: 15 Jul 2004
Posts: 95
Topics: 11
Location: Edison,NJ

PostPosted: Tue Jan 25, 2005 10:24 am    Post subject: Reply with quote

Quote:
Phantom,

You forgot to post the solution of overriding the LRECL solution which I sent you offline

Here is that solution:
Code:

//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
AAA OAO
BBB WSS
CCC OWD
DDD ZYS
EEE FGH
FFF ZYS
GGG HKJ
//SORTOUT DD DSN=&L1,DISP=(,PASS),SPACE=(CYL,(1,1),RLSE),
// DCB=(RECFM=FB,LRECL=21,BLKSIZE=27993)
//SYSIN DD *
SORT FIELDS=COPY
OUTREC FIELDS=(1,6,7,1,
1,6,8,1,
1,6,9,1)
//*
//STEP0200 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=&L1,DISP=(OLD,PASS),LRECL=7
//SORTOUT DD DSN=&L2,DISP=(,PASS),SPACE=(CYL,(1,1),RLSE),
// DCB=(RECFM=FB,LRECL=7,BLKSIZE=27993)
//SYSIN DD *
SORT FIELDS=(1,6,CH,A,7,1,CH,A)
//*
//STEP0300 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=&L2,DISP=(OLD,PASS),LRECL=21
//SORTOUT DD SYSOUT=*,
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=0)
//SYSIN DD *
SORT FIELDS=COPY
OUTREC FIELDS=(1,6,7,1,14,1,21,1,80:X)
//*



Kolusu



Kolusu , Are you talking about this post ? I am not sure how this is related to my question. Please explain.
_________________
Vivek,NJ

Db2,IDMS
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
kolusu
Site Admin
Site Admin


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

PostPosted: Tue Jan 25, 2005 10:30 am    Post subject: Reply with quote

Quote:

Kolusu , Are you talking about this post ? I am not sure how this is related to my question. Please explain.


Vivek,

Yes Indeed I am talking about that post .This is from your first post.

Quote:

but the output file has first 80 bytes in first line of output file i.e. 123456789A123456789B123456789C123456789D123456789E123456789F123456789G123456789H
and
next line has this 123456789A123456789B
I want all of them in same line. Is this possible ? How do we do this.



Since you wanted all the records from the input file in a SINGLE line, I showed you an example of overriding the LRECL.

Hope this clears your question

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


Joined: 15 Jul 2004
Posts: 95
Topics: 11
Location: Edison,NJ

PostPosted: Tue Jan 25, 2005 10:39 am    Post subject: Reply with quote

I will get a detail requirement and be back if needed.
_________________
Vivek,NJ

Db2,IDMS
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
vivek
Beginner


Joined: 15 Jul 2004
Posts: 95
Topics: 11
Location: Edison,NJ

PostPosted: Tue Jan 25, 2005 1:22 pm    Post subject: Reply with quote

Kolusu, I am sorry for the confusion. actually there is no common field.
I just have a line

alsdfjaslfjasldfs ................ 1 to 80 and the next line could be
123472394723489 and i want the second line to start from 81st col in output file.

Makes sense ?

thanks,
_________________
Vivek,NJ

Db2,IDMS
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
kolusu
Site Admin
Site Admin


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

PostPosted: Tue Jan 25, 2005 2:20 pm    Post subject: Reply with quote

Vivek,

I can show you a job to achieve the desired results, but I need some more info. What is the max no: of records in the input file?

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


Joined: 15 Jul 2004
Posts: 95
Topics: 11
Location: Edison,NJ

PostPosted: Fri Jan 28, 2005 11:17 am    Post subject: Reply with quote

Kolusu, there is no limit on number of records. Any way post me a jcl for that.
thanks,
_________________
Vivek,NJ

Db2,IDMS
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
kolusu
Site Admin
Site Admin


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

PostPosted: Fri Jan 28, 2005 12:07 pm    Post subject: Reply with quote

Quote:

Kolusu, there is no limit on number of records. Any way post me a jcl for that.



Vivek,

Without knowing the no: of records it is near impossible to to achieve the desired results. The maximum blksize you can have is 32760. For a 80 byte file, the max blksize is 32720 which can take up to 409 records. After that you cannot really override the lrecl.

Assuming that you have less than 409 records then the following JCL will give you the desired results.


Code:

//STEP0100 EXEC PGM=SORT                         
//SYSOUT   DD SYSOUT=*                           
//SORTIN   DD DSN=YOUR INPUT FILE,
//            DISP=SHR
//SORTOUT  DD SYSOUT=(*,INTRDR)                           
//SYSIN    DD *                                   
   SORT FIELDS=COPY                                             
   INREC FIELDS=(SEQNUM,5,ZD)                                   
   OUTREC FIELDS=(+80,MUL,1,5,ZD,EDIT=(TTTTT),80:X)             
   OUTFIL NODETAIL,REMOVECC,                                     
   TRAILER1=(C'//T-IDZ   JOB CLASS=A,',/,                       
             C'//',13X,C'MSGCLASS=Y,MSGLEVEL=(1,1),',/,         
             C'//',13X,C'NOTIFY=&SYSUID',/,                     
             C'//*',/,                                           
             C'//STEP0100 EXEC PGM=SORT',/,                     
             C'//SYSOUT   DD SYSOUT=*',/,                       
             C'//SORTIN   DD DSN=YOUR INPUT FILE,',/,     
             C'//            DISP=SHR',/,                       
             C'//SORTOUT  DD DSN=&T1,',/,                       
             C'//            DISP=(,PASS),',/,                   
             C'//            UNIT=SYSDA,',/,                     
             C'//            SPACE=(CYL,(5,5),RLSE),',/,         
             C'//            BLKSIZE=',1,5,/,                   
             C'//SYSIN    DD *',/,                               
             C'  SORT FIELDS=COPY',/,                           
             C'/*',/,
             C'//STEP0200 EXEC PGM=SORT',/,                 
             C'//SYSOUT   DD SYSOUT=*',/,                   
             C'//SORTIN   DD DSN=&T1,DISP=SHR,',/,           
             C'//            LRECL=',1,5,/,                 
             C'//SORTOUT  DD DSN=YOUR OUTPUT FILE,',/,       
             C'//            DISP=(NEW,CATLG,DELETE),',/,   
             C'//            UNIT=SYSDA,',/,                 
             C'//            SPACE=(CYL,(5,5),RLSE),',/,     
             C'//SYSIN    DD *',/,                           
             C'  SORT FIELDS=COPY',/,                       
             C'/*',80:X)                                     
/*                                                           


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
slade
Intermediate


Joined: 07 Feb 2003
Posts: 266
Topics: 1
Location: Edison, NJ USA

PostPosted: Sun Jan 30, 2005 1:28 pm    Post subject: Reply with quote

Hi Vivek,

Why don't you try something like this:

Create a PDS w/an LRECL of 255 bytes (I think that's the max ISPF will handle).

Copy your JCL to a member in that PDS, create your 80 byte+ SYSIN data and submit the job.
_________________
Regards, Jack.

"A problem well stated is a problem half solved" -- Charles F. Kettering
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