Dear All,
I Need a help in copying two fields from 2 different fields and pasting it into the 3rd file.
The input files have the Config Parameter as RECFM=FB, LRECL=80.
I do not want to write any Program in COBOL or any REXX to achieve the below,
I can only use SORT program to attain this.
Contents of my input file 'File 1' and 'File 2' are provided as below
File 1:
==MSG> your edit profile using the
000001 LOGON TDPM/LOAD_UK_WID05DNQ_U01,
000002 LOGON TDPM/LOAD_UK_WID05DNQ_U01,
000003 LOGON TDPM/LOAD_UK_WID05DNQ_U01,
000004 LOGON TDPM/LOAD_UK_WID05DNQ_U01,
File 2:
000001 18 // DD DISP=SHR,DSN=XX.PROD.LIVE.TDS(WID05Q1D)
000002 25 // DD DISP=SHR,DSN=XX.PROD.LIVE.TDS(WID05Q2D)
000003 33 // DD DISP=SHR,DSN=XX.PROD.LIVE.TDS(WID05Q3D)
000004 40 // DD DISP=SHR,DSN=XX.PROD.LIVE.TDS(WID05Q4D)
From the above input files, I want the output file should have contents
000001 LOGON TDPM/LOAD_UK_WID05DNQ_U01,WID05Q1D
000002 LOGON TDPM/LOAD_UK_WID05DNQ_U01,WID05Q2D
000003 LOGON TDPM/LOAD_UK_WID05DNQ_U01,WID05Q3D
000004 LOGON TDPM/LOAD_UK_WID05DNQ_U01,WID05Q4D
Note: there is no Key field in matching records between 2 files,
The requirement here is to concatenate the records in the 1st file with the particular String(of 8 chars Length eg: WID05Q1D) from 2nd file into to 3rd file as above.
Kindly help me here
Need Help in copying two fields from 2 files to a 3rd file.
Moderators: Frank Yaeger, Moderator Group
-
- Member
- Posts: 2
- Joined: Mon Jun 24, 2013 7:13 pm
Need Help in copying two fields from 2 files to a 3rd file.
Thanks in Advance,
Sathiya.
Sathiya.
-
- Member
- Posts: 2
- Joined: Mon Jun 24, 2013 7:13 pm
JCL statements are fairly bog-standard...ee
You need statement along the lines of:
plus cards for each dataset as specified in the manual for your solution.
If you want code - how much can you pay?
You need statement along the lines of:
Code: Select all
//STEPXYZ EXEC PGM=yoursortprogramname
//SYSOUT DD SYSOUT=*
//SYSIN DD *
your sort control cards go here
If you want code - how much can you pay?
Regards
Nic
Nic
-
- Active Member
- Posts: 732
- Joined: Thu May 24, 2012 4:07 am
JOINKEYS has been suggested to you. Don't have a key? It has been suggested how you can make one.
If the member-name is in a fixed position, no problem. If in a variable position, look at PARSE.
There are examples: open a manual, type in an internet search.
INREC BUILD for the output you require.
If the member-name is in a fixed position, no problem. If in a variable position, look at PARSE.
There are examples: open a manual, type in an internet search.
Code: Select all
//JNF1CNTL DD *
INREC OVERLAY=(81:sequence number of a length enough to comfortably number all your records)
FREE TUTORIALS
Tutorials
Free tutorials from mainframegurukul
- JCL Tutorial
Covers all important JCL concepts. - Cobol Tutorial
This tutorials covers all Cobol Topics from STRING to COMP-3. - DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. - SORT Tutorial
This Tutorial covers all important aspects of DFSORT with examples - CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page