I have two DataSet's
One DS is having some 1000 records out of which i want to select only 25 records with Business group: EXPRESS CASH starting from position 25.
attached scrn shot1.
Other DS is having 25 recrods with data distributed in 4 columns, out of which i want the last column to be merged output of first ds.
here is the scrn shot2:
please let me know the solution.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Surya,
I deleted your screen shots. They were very difficult to read.
You need to do a better job of explaining what you want to do. Show an example of the records in your input files (relevant fields only) and what you expect for output. Just post your records as text (surround them with ubb code tags if possible - if not, I'll do it for you). Explain the "rules" for getting from input to output. Give the RECFM and LRECL of your input files. Give the starting position, length and format of all relevant fields.
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
Hello,
Quote:
can you please explain me how to do the plain cut with code tag's.
Near the top of the Reply panel is the "Code" tag. You can copy/paste from your 3270-screen and paste into the reply. Once the "screen" is in the editor, highlight the screen inifo and click Code. Then click Preview to see how your post will appear.
You can continue to edit and Preview until you like the way the post will appear to the forum, then click Submit.
You would also use the "Code" tag to post code, jcl, control statements, or data. "Coding" makes the post more readable (green on black) and preserves alignment.
Input File 1:
Rec Length: 133
Rec Fm: FBA
Selection field starting position '25'
Selection Text : 'CASH' in the business group 'Express cash'
Input would have multiple Business groups
Scenario: I would have various Business groups in the Input file, but I want to take only for "Express Cash".
Code:
BUSINESS GROUP EXPRESS CASH
BILLING ------INTERNAL SPENDING----- ------EXTERNAL SPENDING----
CURRENCY
FLAT FLAT MARKED-UP MARKED-UP
BILLING AMOUNT US ¢ EQUIV BILLING AMOUNT US ¢ EQUIV
AUSTRIAN EURO 3,280.97 4,336.43 0.00 0.0
BELGIAN EURO 4,493.46 5,939.00 0.00 0.0
UK STERLING 205,258.29 341,980.50 0.00 0.0
BUSINESS GROUP HUNGARY DIRECT PAY
BILLING ------INTERNAL SPENDING----- ------EXTERNAL SPENDING----
CURRENCY
FLAT FLAT MARKED-UP MARKED-UP
BILLING AMOUNT US ¢ EQUIV BILLING AMOUNT US ¢ EQUIV
U.S.¢ EUROPE 0.00 0.00 404.39 404.3
FRENCH EURO 0.00 0.00 26.33 34.4
GERMAN EURO 0.00 0.00 11.75 15.3
Output : should have only values for Business group 'Express Cash'
Code:
BUSINESS GROUP EXPRESS CASH
BILLING ------INTERNAL SPENDING----- ------EXTERNAL SPENDING----
CURRENCY
FLAT FLAT MARKED-UP MARKED-UP
BILLING AMOUNT US ¢ EQUIV BILLING AMOUNT US ¢ EQUIV
AUSTRIAN EURO 3,280.97 4,336.43 0.00 0.0
BELGIAN EURO 4,493.46 5,939.00 0.00 0.0
UK STERLING 205,258.29 341,980.50 0.00 0.0
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Here's a DFSORT job that will do what you asked for. The job uses DFSORT's new WHEN=GROUP function available with z/OS DFSORT V1R5 PTF UK90013 (July, 2008).
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
Hi,
if you have FILEAID, you can use the following
Code:
//FILEAID EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//DD01 DD *
BUSINESS GROUP EXPRESS CASH
BILLING ------INTERNAL SPENDING----- ------EXTERNAL SPENDING----
CURRENCY
FLAT FLAT MARKED-UP MARKED-UP
BILLING AMOUNT US ¢ EQUIV BILLING AMOUNT US ¢ EQUIV
AUSTRIAN EURO 3,280.97 4,336.43 0.00 0.0
BELGIAN EURO 4,493.46 5,939.00 0.00 0.0
UK STERLING 205,258.29 341,980.50 0.00 0.0
BUSINESS GROUP HUNGARY DIRECT PAY
BILLING ------INTERNAL SPENDING----- ------EXTERNAL SPENDING----
CURRENCY
FLAT FLAT MARKED-UP MARKED-UP
BILLING AMOUNT US ¢ EQUIV BILLING AMOUNT US ¢ EQUIV
U.S.¢ EUROPE 0.00 0.00 404.39 404.3
FRENCH EURO 0.00 0.00 26.33 34.4
GERMAN EURO 0.00 0.00 11.75 15.3
//DD01O DD SYSOUT=*
//SYSIN DD *
$$DD01 SPACE STOP=(16,EQ,C"EXPRESS CASH")
$$DD01 COPY OUT=1
$$DD01 COPY STOP=(01,EQ,C"BUSINESS GROUP")
/*
please, please do not double post about the same issue in different topics,
it will not help to get consistent replies ,
if You find somebody willing to help, probably he/she will take You up to the solution of Your problem,
asking different people to spend time on Your issues is, just.... bad manners
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
surya,
The jcl which I provided worked fine for me with whatever data you provided. If you're looking for a sort solution, you may post the DFSMSG output here which explains the actual reason for failure.