equivalent file-manager command of file-aid command COPYBACK

In this Mainframe Forum - You can post your queries on DFSORT, ICETOOL , SyncSort & JCL Utilities

Moderators: Frank Yaeger, Moderator Group

Post Reply
dgarg7
Member
Posts: 6
Joined: Thu Nov 14, 2013 3:59 pm
Location: hyderabad

equivalent file-manager command of file-aid command COPYBACK

Post by dgarg7 » Fri Nov 15, 2013 8:03 am

My client is stopping use of file-aid, now they want us to use file-manager. We have been using following command in JCL for copying the last 5 records from input file, when the number of records in input file was unknown. Please see the below piece of code in file-aid:
//FILEAID1 EXEC PGM=FILEAID,REGION=1M,COND=(7,GE,CHKFILE)
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//DD01 DD DSN=ABC.TEMP,DISP=SHR
//DD01O DD DSN=&&TEST3,
// UNIT=TSTDA,SPACE=(CYL,(5,5),RLSE),DISP=(,PASS),
// DCB=*.DD01
//SYSIN DD *
$$DD01 COPYBACK OUT=05
/*

If anybody uses filemanager in jobs, Please help me. I tried to google, but to no avail :(

William Collins
Active Member
Posts: 732
Joined: Thu May 24, 2012 4:07 am

Post by William Collins » Fri Nov 15, 2013 12:31 pm

Well, from the forum you've posted in, look at ICETOOL's SELECT operator with LAST ( 5 ).

dgarg7
Member
Posts: 6
Joined: Thu Nov 14, 2013 3:59 pm
Location: hyderabad

Post by dgarg7 » Fri Nov 15, 2013 2:20 pm

Sorry to say but they dont use ICETOOL either :(

NicC
Active Member
Posts: 650
Joined: Sun Jul 24, 2011 5:27 pm
Location: Down on the pig farm

Post by NicC » Fri Nov 15, 2013 7:40 pm

Which sort product DO they use?
Regards
Nic

DikDude
Moderator
Posts: 1001
Joined: Fri Jul 22, 2011 8:39 am
Location: usa

Post by DikDude » Sat Nov 16, 2013 12:45 am

Sorry to say but they dont use ICETOOL either
Does this mean they are simply unwilling to use it or that there is no ICETOOL on their system?
Have a good one

dgarg7
Member
Posts: 6
Joined: Thu Nov 14, 2013 3:59 pm
Location: hyderabad

Post by dgarg7 » Mon Nov 18, 2013 9:05 am

Yeah, they don't have ICETOOL.
They are using DFSORT.

dgarg7
Member
Posts: 6
Joined: Thu Nov 14, 2013 3:59 pm
Location: hyderabad

Post by dgarg7 » Mon Nov 18, 2013 10:00 am

One more tool, which I forgot to mention earlier is ICEMAN..

William Collins
Active Member
Posts: 732
Joined: Thu May 24, 2012 4:07 am

Post by William Collins » Mon Nov 18, 2013 12:17 pm

ICETOOL is part of DFSORT (also ICEMAN is an ALIAS for SORT - or rather the other way around).

So you do have ICETOOL. Consult the documentation, look to Chapter 7, and the SELECT operator.

dgarg7
Member
Posts: 6
Joined: Thu Nov 14, 2013 3:59 pm
Location: hyderabad

Post by dgarg7 » Mon Nov 18, 2013 2:53 pm

Hi Guys.. Thanks for all your help!!

I used below control card and it worked :

//TOOLIN DD *
SUBSET FROM(IN) TO(OUT) KEEP INPUT LAST(5) USING(CTL1)
//CTL1CNTL DD *
SORT FIELDS=(4,1,BI,D)
SUM FIELDS=NONE

It may help someone..

Velu
Member
Posts: 2
Joined: Tue Nov 19, 2013 2:11 pm
Location: Chennai

FINDREP in sort

Post by Velu » Tue Nov 19, 2013 2:47 pm

Hi All,

Please help me on the below issue.

Requirements:

In a file it has 4 fields. In these fields we may have special character’s like “ä, ö, ü and ß”. So we need to convert these special characters into “AU,OE,UE and SS”. Here we need to replace a single character with 2 character.
If we replace these, it should use the remaining spaces of the corresponding fields.

For an example:

Here the special character “ä” has to be changed as “AU”. This special character might come anywhere in the below fields. So We need to replace this without any displacement in the other fields. Since it should use the spaces which are available in the corresponding fields.it should not change the starting position of other fields.

Since every field is having some extra spaces, so OUTREC FINDREP should use these extra spaces while replacing it. Please help me on this.


Dept User id Name Area code
Code (10-35 length) (36-55 length) (56-69 length)
(1-9 length)

01 816 2138201656011656IM FANG IM FANG FR1 83320
01 817 2138101656001656JAUN JAUN FR1 83319
01 818 843201657001657ABLäNDSCHEN ABLäNDSCHEN BE1 83320
01 818 843201657001657ABLAUNDSCHEN ABLAUNDSCHEN BE1 83320
01 818 843201657001657ABLAUNDSCHEN ABLAUNDSCHEN BE1 83320
01 819 2126201654001654CERNIAT FR CERNIAT FR FR2 83320

Sort condition which I used:

//SYSIN DD *
SORT FIELDS=COPY
OUTREC FINDREP=(INOUT=(C'ä',C'AE',C'ö',C'OE',
C'ü',C'UE',C'ß',C'SS'))
/*
Thanks
Velu.

NicC
Active Member
Posts: 650
Joined: Sun Jul 24, 2011 5:27 pm
Location: Down on the pig farm

Post by NicC » Tue Nov 19, 2013 7:16 pm

Why have you tagged this onto the end of a completely different topic? New subject = new topic.

Which sort product are you using and what are the dataset characteristics?
Regards
Nic

William Collins
Active Member
Posts: 732
Joined: Thu May 24, 2012 4:07 am

Post by William Collins » Tue Nov 19, 2013 8:29 pm

Have a loiok at the documentation of FINDREP. You can limit the bytes it looks at, and specify whether data will be shifted during a replacement. However, I don't know if it will work for you, as you are extending bytes which have data following the single source byte. If not, you'll have to relocate each field, where depends on your RECFM, FINDREP the field there, and then put the amended field back where it came from and remember to revert to the original record-lenght by dropping the extended data.

academyindia4

Topic deleted by Admin

Post by academyindia4 » Mon Jan 25, 2016 9:43 pm

<< Content deleted By Admin >>

Post Reply

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



Other References
Mainframe Tools and others