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
 

 

Sort card to replace text using cross reference file
Goto page Previous  1, 2
 
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> SYNCSORT
View previous topic :: :: View next topic  
Author Message
Abid Hasan

New User


Joined: 25 Mar 2013
Posts: 73
Location: India

PostPosted: Thu Sep 22, 2016 2:32 pm    Post subject:
Reply with quote

And the JCL, please?!

Edit: Aah, the things *SORT does icon_smile.gif

Refer this link, it has precisely what you need: http://ibmmainframes.com/about60103.html
Back to top
View user's profile Send private message

Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1727
Location: UK

PostPosted: Thu Sep 22, 2016 5:05 pm    Post subject:
Reply with quote

Show us the JCL for DDname F1ONLY.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2203
Location: @my desk

PostPosted: Thu Sep 22, 2016 5:25 pm    Post subject:
Reply with quote

Susanta - You might want to use IFOUTLEN to limit the output record length like this.
Code:
OUTFIL FNAMES=F1ONLY,IFOUTLEN=90,
Back to top
View user's profile Send private message
Susanta

Active User


Joined: 17 Nov 2009
Posts: 118
Location: India

PostPosted: Thu Sep 22, 2016 5:29 pm    Post subject:
Reply with quote

HI..

i have another need where f1 file is of VB format.

and F2 is still of FB format.

what changes required for the bewlo card for this scenario.
could you please help.

Code:
JOINKEYS FILE=F1,FIELDS=(11,14,CH,A)             
 JOINKEYS FILE=F2,FIELDS=(2,14,CH,A)               
 JOIN UNPAIRED,F1                                 
 REFORMAT FIELDS=(F1:1,90,F2:1,55),FILL=C'$'       
 SORT FIELDS=(1,10,ZD,A)                           
                                                   
 OUTFIL FNAMES=F1ONLY,                             
 IFTHEN=(WHEN=(1,1,CH,NE,C'$',AND,91,1,CH,EQ,C'$'),
        BUILD=(1,90)),                             
 IFTHEN=(WHEN=(1,1,CH,NE,C'$',AND,91,1,CH,NE,C'$'),
        BUILD=(1,10,106,14,25,64))                 

Back to top
View user's profile Send private message
Abid Hasan

New User


Joined: 25 Mar 2013
Posts: 73
Location: India

PostPosted: Thu Sep 22, 2016 5:42 pm    Post subject:
Reply with quote

Hello NicC, the problem will keep coming unless the length is handled explicitly as tested by Pandora/Mr. Woodgar in the earlier tagged post; at least for SYNCSORT.

Aside, Susanta, for a VB dataset, you add 4 to the already specified start-of-data positions; for example, from: FIELDS=(11,14,CH,A) , 11 changes to 15; from FIELDS=(2,14,CH,A), 2 changes to 6; and so on. Play around with it a bit, and you should be able to work it out. There are hundreds of examples for this available on the forum as well as the good ol' web (if the manual is not around).

Do confirm if the information from the link shared and stated by Mr. Raj a few posts earlier was helpful in to resolving the issue, because your last sort-card doesn't show any changes.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2203
Location: @my desk

PostPosted: Thu Sep 22, 2016 5:46 pm    Post subject:
Reply with quote

Are all other issues solved now? If VB is the only thing troubling you, you should be able to figure it out yourself. There are plenty of working examples here showing what needs to be done for handling VB datasets.

Next time when you start a new topic, try to post as much information as possible in your very first post instead of throwing it in bits. That would make it easier for others who are trying to help you.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7271

PostPosted: Thu Sep 22, 2016 6:59 pm    Post subject: Reply to: Sort card to replace text using cross reference file
Reply with quote

If the REFORMAT is variable, the OUTFIL must be variable or have VTOF/CONVERT.
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1638
Location: NY,USA

PostPosted: Thu Sep 22, 2016 8:27 pm    Post subject:
Reply with quote

Susanta, Please take sometime and freeze your need once for all and then do some research by yourself to learn and get things done independently. Because if you are a Beginner to DFSORT/SYNCSORT then the right place to post your question and learn is here.
Back to top
View user's profile Send private message
Susanta

Active User


Joined: 17 Nov 2009
Posts: 118
Location: India

PostPosted: Fri Sep 23, 2016 5:26 pm    Post subject:
Reply with quote

HI..
The ifoutlen syntax worked .
Code:
OUTFIL FNAMES=F1ONLY,IFOUTLEN=90,

Now code for F1/f2 as FB format working for me.

Thanks
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7271

PostPosted: Fri Sep 23, 2016 9:02 pm    Post subject: Reply to: Sort card to replace text using cross reference file
Reply with quote

I don't know why I thought the REFORMAT was variable :-)

In your first BUILD, you have 90 bytes of data, in the second 88. That's the reason for the failure. You could add 2X to the end of the second BUILD, or, perhaps less clear, use the IFOUTLEN as you have.
Back to top
View user's profile Send private message
Susanta

Active User


Joined: 17 Nov 2009
Posts: 118
Location: India

PostPosted: Sun Sep 25, 2016 4:34 pm    Post subject:
Reply with quote

Hi...

I am facing issue with F1 (VB file with len 80) and F2 (FB file of len 55).
getting abend..
IEF450I TXXXYY03 PS080 JS010 - ABEND=S000 U0016 REASON=00000000


The card is ..


Code:
SYNCSORT FOR Z/OS  2.1.1.1R    U.S. PATENTS: 4210961, 5117495   (C) 2014 SYNCSO
                                                      z/OS   2.1.0             
SYNCSORT LICENSED FOR CPU SERIAL NUMBER 19D64, MODEL 2827 718             LICEN
SYSIN :                                                                       
 JOINKEYS FILE=F1,FIELDS=(15,14,CH,A)                                         
 JOINKEYS FILE=F2,FIELDS=(2,14,CH,A)                                           
 JOIN UNPAIRED,F1                                                             
 REFORMAT FIELDS=(F1:1,4,5,86,F2:1,55),FILL=C'$'                               
 SORT FIELDS=(5,10,ZD,A)                                                       
                                                                               
 OUTFIL FNAMES=F1ONLY,IFOUTLEN=80,                                             
 IFTHEN=(WHEN=(5,1,CH,NE,C'$',AND,91,1,CH,EQ,C'$'),                           
        BUILD=(1,4,15,76)),                                                   
 IFTHEN=(WHEN=(5,1,CH,NE,C'$',AND,91,1,CH,NE,C'$'),                           
        BUILD=(1,4,106,14,29,62))                                             
WER813I  INSTALLATION OPTIONS IN MFX LOAD LIBRARY WILL BE USED                 
WER164B  17,736K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,           
WER164B     0 BYTES RESERVE REQUESTED, 416K BYTES USED                         
WER146B  32K BYTES OF EMERGENCY SPACE ALLOCATED                               
WER481I  JOINKEYS REFORMAT RECORD LENGTH=  145, TYPE = F                       
WER202A  F1ONLY   RECFM INCOMPATIBLE                                           
WER110I  F1ONLY   : RECFM=VB   ; LRECL=    80; BLKSIZE=                       
WER074I  F1ONLY   : DSNAME=TXX.XX.XXXXX.TEST.VB.V2                       
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000                                 
WER482I  JNF1 STATISTICS                                                       
WER483B  1,956K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,             
WER483B     0 BYTES RESERVE REQUESTED, 476K BYTES USED                         
WER108I  SORTJNF1 : RECFM=VB   ; LRECL=    80; BLKSIZE= 27998                 
WER073I  SORTJNF1 : DSNAME=XXX.XXXX.XXXXX.XXXX.VB.V1                       
WER482I  JNF2 STATISTICS                                                       
WER483B  1,956K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,             
WER483B     0 BYTES RESERVE REQUESTED, 476K BYTES USED                         
WER108I  SORTJNF2 : RECFM=FB   ; LRECL=    55; BLKSIZE=  5500                 
WER073I  SORTJNF2 : DSNAME=TXX.XX.XREF.FILE




In this same step JNF1CNTL is used to add SEQNUM of 10 bytes to file
XXX.XXXX.XXXXX.XXXX.VB.V1

The card is ..
Code:
   INREC FIELDS=(1:1,4,5:SEQNUM,10,ZD,15:5,76) 


Could you please help.
Thnaks,
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10217
Location: italy

PostPosted: Sun Sep 25, 2016 5:30 pm    Post subject: Reply to: Sort card to replace text using cross reference file
Reply with quote

topic locked,
when a topic does not reach a conclusion after 30 posts
it means that everybody is wasting his time.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7271

PostPosted: Sun Sep 25, 2016 8:31 pm    Post subject: Reply to: Sort card to replace text using cross reference file
Reply with quote

I haven't checked, but I think Arun Raj suggested using the match-marker (?) in your REFORMAT statement, which will simplify things.

You have now made you output file, F1ONLY, variable-length, with a fixed-length REFORMAT. So you have "incompatible".

If you continue to have problems, start a new quesiton.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> SYNCSORT All times are GMT + 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Formating the Input file sreekusr DFSORT/ICETOOL 3 Fri Feb 17, 2017 10:40 pm
No new posts JCL sort Match and NoMatch rakeshsekar1987 SYNCSORT 2 Thu Feb 02, 2017 10:26 pm
No new posts Sort two file having same field, one ... himanshu malik DFSORT/ICETOOL 7 Thu Feb 02, 2017 10:09 am
No new posts Remove junk values in a file and rite... KP1125 DFSORT/ICETOOL 2 Wed Jan 25, 2017 9:58 pm
No new posts Sort Card to Remove Duplicate records... raj4neo SYNCSORT 2 Wed Jan 25, 2017 4:44 am


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