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

copy one PS file to another PS file having varying LRECL


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

New User


Joined: 31 Jan 2007
Posts: 9
Location: chennai

PostPosted: Fri Jun 15, 2007 12:58 pm
Reply with quote

Hi,
Can anybody tell me how to copy datas from one PS file to another PS having varying LRECL using JCL.

Thanks
Veena
Back to top
View user's profile Send private message
muthuvel

Active User


Joined: 29 Nov 2005
Posts: 217
Location: Canada

PostPosted: Fri Jun 15, 2007 1:04 pm
Reply with quote

If the new file LREC is less than the existing file ,the data will get truncated in the new file.If the LREC is greater,Else use SORT method .
Back to top
View user's profile Send private message
r.ravikumar

New User


Joined: 05 Jan 2007
Posts: 18
Location: chennai

PostPosted: Fri Jun 15, 2007 1:08 pm
Reply with quote

Why not, we can copy...
Back to top
View user's profile Send private message
amitava
Warnings : 1

Active User


Joined: 30 Oct 2005
Posts: 186
Location: India

PostPosted: Fri Jun 15, 2007 1:10 pm
Reply with quote

Hi Pravena,
Use the following JCL step to convert from FB to VB -

Code:

//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=A123456.SORT.SAMPIN,DISP=SHR
//VBOUT DD DSN=A123456.SORT.VSAMP,DISP=(NEW,CATLG,DELETE),
// UNIT=3390,SPACE=(CYL,(5,5))
//SYSIN DD *
    OPTION COPY
    OUTFIL FNAMES=VBOUT,FTOV
/*


Regards,

Amitava
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Fri Jun 15, 2007 1:13 pm
Reply with quote

Hello,

Even though your lrecl may vary between files, if the input and output from each copy will have the same lrecl yo can simply use IEBGENER.

If you specify SYSUT2 without dcb parameters the dcb info from the input will be used when creating the output. When you specify SYSUT1, all you need is the dsn and disp, the dcb info will be handled automatically.

So, you can copy any PS file without knowing the dcb info at all icon_smile.gif
Back to top
View user's profile Send private message
pravena

New User


Joined: 31 Jan 2007
Posts: 9
Location: chennai

PostPosted: Fri Jun 15, 2007 3:19 pm
Reply with quote

Thanks Everyone.

Amitava,

I tried the one u gave but again got this error.

OUTPUT LRECL DIFFERS FROM SORTOUT LRECL

Dick , in my case the file length is increased so i have to mention the DCB parameter.

Pravena
Back to top
View user's profile Send private message
amitava
Warnings : 1

Active User


Joined: 30 Oct 2005
Posts: 186
Location: India

PostPosted: Fri Jun 15, 2007 3:38 pm
Reply with quote

Hi Pravena,
Please refer the SYSOUT display below. (Though it is of my job's SYSOUT; My job is having different SYSIN). It (Dark red colored and bold lettered) is saying that my output file is having different LRECL than INPUT but the job runs successfully. And FYIP - this is not an error message; it is an information. Have you checked your output file?
It should come fine.

Code:

SYSIN :                                                                       
     SORT FIELDS=(1,5,CH,A,29,9,CH,A)                                         
     INREC FIELDS=(1,400,SEQNUM,8,ZD)                                         
     SUM FIELDS=(401,8,ZD)                                                   
WER108I  SORTIN   : RECFM=FB   ; LRECL=   400; BLKSIZE= 27600                 
WER257I  INREC RECORD LENGTH =   408                                         
WER110I  SORTOUT  : RECFM=FB   ; LRECL=   410; BLKSIZE= 27880

WER462I OUTPUT LRECL DIFFERS FROM SORTOUT LRECL
Code:

WER045C  END SORT PHASE                                                       
WER055I  INSERT          0, DELETE     346277                                 
WER418I  DATASPACE(S) AND/OR ZSPACE USED                                     
WER246I  FILESIZE 158,348,064 BYTES                                           
WER054I  RCD IN     388108, OUT      41831                                   
WER072I  EQUALS IN EFFECT                                                     
WER169I  RELEASE 1.2 BATCH 0458 TPF LEVEL 1.1                                 
WER052I  END SYNCSORT - XA2CJCVS,JSTEP004,,DIAG=AE00,7109,8230,E45F,E7CE,4883,


Regards,

Amitava
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 FTP VB File from Mainframe retaining ... JCL & VSAM 4
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top