View previous topic :: View next topic
|
Author |
Message |
a b c d
New User
Joined: 04 Mar 2010 Posts: 13 Location: UK
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Line 14 |
|
Back to top |
|
|
a b c d
New User
Joined: 04 Mar 2010 Posts: 13 Location: UK
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
Back to top |
|
|
a b c d
New User
Joined: 04 Mar 2010 Posts: 13 Location: UK
|
|
|
|
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 |
|
|
SAMOLESAM
New User
Joined: 19 May 2010 Posts: 2 Location: USA
|
|
|
|
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 |
|
|
a b c d
New User
Joined: 04 Mar 2010 Posts: 13 Location: UK
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
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 |
|
|
a b c d
New User
Joined: 04 Mar 2010 Posts: 13 Location: UK
|
|
|
|
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 |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
a b c d
New User
Joined: 04 Mar 2010 Posts: 13 Location: UK
|
|
|
|
Thank you very much to all |
|
Back to top |
|
|
|