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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Selcopy -how to increase the LRECL of output file in selcopy
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Fri Jul 02, 2010 4:56 pm    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Fri Jul 02, 2010 5:18 pm    Post subject:
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    Post subject:
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    Post subject: Reply to: Selcopy -how to increase the LRECL of output file
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    Post subject:
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

Site Director


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

PostPosted: Fri Jul 02, 2010 9:19 pm    Post subject:
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: 645
Location: Pennsylvania

PostPosted: Fri Jul 02, 2010 9:38 pm    Post subject:
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    Post subject:
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: 2150
Location: At my coffee table

PostPosted: Fri Jul 02, 2010 10:27 pm    Post subject:
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 Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri Jul 02, 2010 10:29 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
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
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


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