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

Selcopy -how to increase the LRECL of output file in selcopy


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
a b c d

New User


Joined: 04 Mar 2010
Posts: 13
Location: UK

PostPosted: Fri Jul 02, 2010 4:50 pm
Reply with quote

Hi,

I am reading an input file of LRECL=125 and it is a FB, Now I need to appended few more data to the input data and write out to ouput file of LRECL=200 either a VB or FB.

I tried doing the above using selcopy in mainframe JCL, but the input and the output LREC is taking as 125. Could you please help me!!!!!!!!!!!!!
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Jul 02, 2010 4:55 pm
Reply with quote

it would help if you showed the JCL of the step and the control cards;
that way someone could provide you with a solution to your incorrect process methodology.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Jul 02, 2010 4:56 pm
Reply with quote

Line 14
Back to top
View user's profile Send private message
a b c d

New User


Joined: 04 Mar 2010
Posts: 13
Location: UK

PostPosted: Fri Jul 02, 2010 5:05 pm
Reply with quote

Plesae find below

Selcopy card:
RD INPUT W 100000
MOVE ';' TO POS=LRECL+1
MOVE 'X' TO POS=1001
WR OUTPUT

Where the input file is FB with LRECL=519
and output file is VB

After the execution the spool information as mentioned below

FILE BLKSIZE LRECL
---- ------- -----
READ INPUT 27507 519 FB

WR OUTPUT 27998 523 VB
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Jul 02, 2010 5:18 pm
Reply with quote

dbzTHEdinosauer wrote:
it would help if you showed the JCL of the step and the control cards;
that way someone could provide you with a solution to your incorrect process methodology.

Also, how do the quoted record lengths of your second post relate to those of your first post.

Please, a little consistency when you post icon_cry.gif
Back to top
View user's profile Send private message
a b c d

New User


Joined: 04 Mar 2010
Posts: 13
Location: UK

PostPosted: Fri Jul 02, 2010 7:25 pm
Reply with quote

Please find the JCL step.....as mentioned earlier input file is FB and LRECL=519 and output file is VB....after the execution the output file LRECL restricted to the size of INPUT file

Code:
//STEP1   EXEC PGM=SELCOPY                               
//SYSPRINT DD SYSOUT=*                                   
//INPUT    DD DISP=SHR,DSN=YA1E50A.INPUT   
//OUTPUT   DD DISP=SHR,DSN=YA1E50A.OUTPUT 
//SYSIN    DD *                                         
  RD INPUT W 100000                                     
  MOVE ';' TO POS=LRECL+1                               
  MOVE 'X' TO POS=1001                                   
  WR OUTPUT                                             
/*                           

SPOOL information....
Code:
FILE     BLKSIZE  LRECL
----     -------  -----
INPUT     27507   519 FB
                       
OUTPUT    27998   523 VB   


Hope this will be sufficient to analyze the problem
Back to top
View user's profile Send private message
SAMOLESAM

New User


Joined: 19 May 2010
Posts: 2
Location: USA

PostPosted: Fri Jul 02, 2010 8:06 pm
Reply with quote

The sort below will achieve what you asked in your original question.

Input = 125

Copy original record (125) while appending data in positions 126 and 127.

Output = 200



Code:

//*                                                       
//EXMPLE   EXEC PGM=SORT,COND=(0,LT)                     
//SYSIN    DD *                                           
 SORT FIELDS=(COPY)                                       
  OUTFIL FNAMES=NEWREC,                                   
        OUTREC=(001:001,125,                             
                126:C';',                                 
                127:C'X',                                 
                200:C' ')                                 
//SORTIN   DD DSN=ABCD.INPUT.L125,DISP=SHR               
//NEWREC   DD DSN=ABCD.OUTPT.L200,DISP=(NEW,CATLG,DELETE)
//*                                                       
Back to top
View user's profile Send private message
a b c d

New User


Joined: 04 Mar 2010
Posts: 13
Location: UK

PostPosted: Fri Jul 02, 2010 8:51 pm
Reply with quote

Thanks Sam...

But I need to do in Selcopy, cos there is not of processing going on in the back ground.....
I am trying to explain the senario in proto type....I have to replace all semicolons (;) by Coma (,) and each field should be enclosed by double quotes("), While doing so output file LRECL will be more than input file

Input file looks like
Peter;Alllan;Raju;Redhill

Output file to be shown as below
"Peter","Alllan","Raju","Redhill",
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 Jul 02, 2010 9:19 pm
Reply with quote

Hello,

Quote:
But I need to do in Selcopy, cos there is not of processing going on in the back ground.....
Someone may want to use selcopy, but this is not a need. The need is to modify the data.

I have no idea why the amount of work in background is a concern. . .

The sort will most likely run "better" than selcopy anyway.
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Fri Jul 02, 2010 9:38 pm
Reply with quote

a b c d,

You appear to have trouble getting answers to your issue.

The best way to get help on this forum is to:
1) Give as much information as possible.
Edit it somewhat so only revelant is given, but not edit down to the point that you have left off something important.
2) Be consistent. LRECL and recfms and the like should not change.
3) When asked for information, GIVE ALL WHAT IS ASKED FOR.
4) Do not change requirements and rules in between posts
5) Do not use words like 'cos' (what does that mean anyway?)
6) The people here are very good at providing solutions, not just answering a specific syntax issue or the like.

So in your case I would have started with my first post something like:

you are talking...
Hi,

I have to modify data in an input file fb 519 to an output file that is vb
(WHY vb?).

Input file looks like
Peter;Alllan;Raju;Redhill

Output file to be shown as below
"Peter","Alllan","Raju","Redhill",

The process to perform this should not run in the background, but rather from TSO/ISPF (a guess here? and why). The user will initiate this by doing this. (Doing what I wonder?)

I was trying to use selcopy (in batch? and why?) but ran into this issue...

Here is my JCL and input cards....

This is only a prototype, so any other ideas on how to accomplish this is appreciated.


back to me talking....
You see I gave some backgroud, lots of information, (still alot for you to give however).

If you want help, you need to be more helpful.
Back to top
View user's profile Send private message
a b c d

New User


Joined: 04 Mar 2010
Posts: 13
Location: UK

PostPosted: Fri Jul 02, 2010 9:40 pm
Reply with quote

Hi Dick,

If it is possible to reformart the data in the SORT, am happy to go with it...

Input file looks like
Peter;Alllan;Raju;Redhill

Output file to be shown as below
"Peter","Alllan","Raju","Redhill",
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Fri Jul 02, 2010 10:27 pm
Reply with quote

a b c d wrote:
If it is possible to reformart the data in the SORT, am happy to go with it...

Input file looks like
Peter;Alllan;Raju;Redhill

Output file to be shown as below
"Peter","Alllan","Raju","Redhill",


FINDREP: Reformat each record by doing various types of find and replace operations. Example: INREC FINDREP=(IN=C'Mr.',OUT=C'Mister')
Or
INREC FINDREP=(IN=C';',OUT=C'","')
but you will have to deal with the first and the last quotes...
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: Fri Jul 02, 2010 10:29 pm
Reply with quote

a b c d,

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

Code:

//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...  input file (FB/125)
//SORTOUT DD DSN=...  output file (FB/200)
//SYSIN DD *
  OPTION COPY
  INREC IFTHEN=(WHEN=INIT,FINDREP=(IN=C';',OUT=C'","',MAXLEN=197)),
    IFTHEN=(WHEN=INIT,
      BUILD=(1,197,JFY=(SHIFT=LEFT,LEAD=C'"',TRAIL=C'",',
        LENGTH=200)))
/*
Back to top
View user's profile Send private message
a b c d

New User


Joined: 04 Mar 2010
Posts: 13
Location: UK

PostPosted: Fri Jul 02, 2010 10:36 pm
Reply with quote

Thank you very much to all icon_smile.gif
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 TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 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