|
View previous topic :: View next topic
|
| Author |
Message |
sdurvasu
New User
Joined: 14 Apr 2008 Posts: 15 Location: chennai
|
|
|
|
Hi,
Here is the requirement;
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. |
|
| Back to top |
|
 |
sdurvasu
New User
Joined: 14 Apr 2008 Posts: 15 Location: chennai
|
|
|
|
can you please explain me how to do the plain cut with code tag's.
I will do that and report . |
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Developer

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. |
|
| Back to top |
|
 |
dick scherrer
Moderator Emeritus

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. |
|
| Back to top |
|
 |
sdurvasu
New User
Joined: 14 Apr 2008 Posts: 15 Location: chennai
|
|
|
|
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
|
|
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Developer

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).
| Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file (FBA/133)
//SORTOUT DD DSN=... output file (FBA/133)
//SYSIN DD *
OPTION COPY
INREC IFTHEN=(WHEN=GROUP,
BEGIN=(2,14,CH,EQ,C'BUSINESS GROUP'),
PUSH=(134:25,4))
OUTFIL INCLUDE=(134,4,CH,EQ,C'CASH'),BUILD=(1,133)
/*
|
If you don't have z/OS DFSORT PTF UK90013, ask your System Programmer to install it (it's free).
For complete details on the new functions available with PTF UK90013, see:
Use [URL] BBCode for External Links |
|
| Back to top |
|
 |
sdurvasu
New User
Joined: 14 Apr 2008 Posts: 15 Location: chennai
|
|
|
|
I got the below abend:
| Code: |
SYSIN :
OPTION COPY
INREC IFTHEN=(WHEN=GROUP,
*
BEGIN=(2,14,CH,EQ,C'BUSINESS GROUP'),
PUSH=(134:25,4))
OUTFIL INCLUDE=(134,4,CH,EQ,C'CASH'),BUILD=(1,133)
WER268A INREC STATEMENT : SYNTAX ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
|
Please advise |
|
| Back to top |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
You asked your question in the DFSORT part of the forum.
You are using Syncsort, not DFSORT.
What release of Syncsort are you running (it is listed at the top of the informational output from any sort)?
GROUP is not available in even the most current version of Syncsort - it is quite new to DFSORT. |
|
| Back to top |
|
 |
sdurvasu
New User
Joined: 14 Apr 2008 Posts: 15 Location: chennai
|
|
|
|
I am sorry to bother you,
Can you please explain me how this can be done with out dfsort
either thru other JCl utilities. If possible. |
|
| Back to top |
|
 |
sdurvasu
New User
Joined: 14 Apr 2008 Posts: 15 Location: chennai
|
|
|
|
| am using the release SYNCSORT FOR Z/OS 1.2.3 |
|
| Back to top |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
No bother
Someone may be able to show a way to do this with Syncsort. It would have to be a differnt approach as GROUP is not part of Syncsort.
For someone to help, they would need to know what version of Syncsort you are running.
If i needed this quickly, i would start writing a bit of code to do what was wanted. |
|
| Back to top |
|
 |
gcicchet
Senior Member
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")
/* |
Gerry |
|
| Back to top |
|
 |
sdurvasu
New User
Joined: 14 Apr 2008 Posts: 15 Location: chennai
|
|
|
|
It's Working....
Thank you Very much gcicchet |
|
| Back to top |
|
 |
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2482 Location: @my desk
|
|
|
|
Hi surya,
Here's a SYNCTOOL job which works for your requirement. Try this and post back if you face any issues.
| Code: |
//STEP01 EXEC PGM=SYNCTOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN= Input file ---- FBA,LRECL=133
//OUT DD DSN= Output file ---- FBA,LRECL=133
//TOOLIN DD *
SPLICE FROM(IN) TO(OUT) ON(134,8,CH) WITHALL WITH(1,133) -
KEEPBASE KEEPNODUPS USING(CTL1)
//CTL1CNTL DD *
INREC IFTHEN=(WHEN=INIT,
OVERLAY=(134:SEQNUM,8,ZD)),
IFTHEN=(WHEN=(2,14,CH,EQ,C'BUSINESS GROUP'),
OVERLAY=(134:SEQNUM,8,ZD),HIT=NEXT),
IFTHEN=(WHEN=(2,22,CH,EQ,C'BUSINESS GROUP EXPRESS CASH'),
OVERLAY=(150:C'S')),
IFTHEN=(WHEN=NONE,
OVERLAY=(142:SEQNUM,8,ZD,134:142,8,ZD,SUB,134,8,ZD,M11,LENGTH=8))
OUTFIL INCLUDE=(150,1,CH,EQ,C'S'),BUILD=(1,133) |
|
|
| Back to top |
|
 |
sdurvasu
New User
Joined: 14 Apr 2008 Posts: 15 Location: chennai
|
|
|
|
Gave RC=16 with below message;
| Code: |
WER428I CALLER-PROVIDED IDENTIFIER IS "0001"
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
|
| Code: |
SYNCTOOL RELEASE 1.5.3 - COPYRIGHT 2004 SYNCSORT INC.
INITIAL PROCESSING MODE IS "STOP"
"TOOLIN" INTERFACE BEING USED
SPLICE FROM(IN) TO(OUT) ON(134,8,CH) WITHALL WITH(1,133) -
KEEPBASE KEEPNODUPS USING(CTL1)
SYNCSORT CALLED WITH IDENTIFIER "0001"
SYNCSORT COMPLETED UNSUCCESSFULLY
OPERATION COMPLETED WITH RETURN CODE 16
PROCESSING MODE CHANGED FROM "STOP" TO "SCAN" DUE TO OPERATION FAILURE
SYNCTOOL PROCESSING COMPLETED WITH RETURN CODE 16
|
Thank you arcvns very much for your code. |
|
| Back to top |
|
 |
enrico-sorichetti
Superior Member

Joined: 14 Mar 2007 Posts: 10900 Location: italy
|
|
|
|
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 |
|
| Back to top |
|
 |
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2482 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. |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|