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
 

 

Query regarding copy pasting string

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
mohitsaini
Warnings : 1

New User


Joined: 15 May 2006
Posts: 92

PostPosted: Mon Oct 13, 2014 4:14 pm    Post subject: Query regarding copy pasting string
Reply with quote

I have two files , where one file is having LRECL = 6 (FB) and another file having LRECL = 90 (FB), File 1 has only one record of length 6 bytes and File 2 can have many records ,
My query is , can I put the value in File 1 which is of length 6 bytes into the header record of File 2 at position 5 leaving rest of the record and fields as it is. Example is as below.


FILE1 :length 6
Code:
1-----6
123456


FILE2 :length 90
Code:
1-------------------------------------------------------------------------------------------------------------90
VOL1                        99999999
D54675376897699996979896986999657   
D45645345478957758467367673676467

Output :
Code:
1-------------------------------------------------------------------------------------------------------------90
VOL1123456          99999999                   
D54675376897699996979896986999657   
D45645345478957758467367673676467

Can we do it in one step?

Regards,
Mohit

Code'd
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Mon Oct 13, 2014 5:18 pm    Post subject: Reply to: Query regarding copy pasting string
Reply with quote

If your one-record file had something identifiable on, and was a 90-byte record, you could do it with a concatenation and IFTHEN=(WHEN=GROUP and RECORDS=2. Even with no identification, you could do it by generating a sequence number (use more resources that way, though). There's JOINKEYS (more resources).

Or a two-step approach where you generate a symbol/SYMANES for your one-record file, and use the generated symbols on SYMNAMES in the second step. There are examples here. For instance.
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts change string before sertan string anatol DFSORT/ICETOOL 8 Tue Aug 15, 2017 5:43 pm
No new posts Unable to copy data from spool in a d... srikant314 JCL & VSAM 8 Fri Jul 28, 2017 9:10 pm
No new posts Need DB2 query to fetch previous row ! Chandan1993 DB2 10 Sat Jun 03, 2017 10:43 am
No new posts Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
No new posts copy SEQ to PDS and create stats steve-myers JCL & VSAM 7 Thu Apr 27, 2017 1:15 am


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