Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all 8500 articles
Browse latest View live

SYNCSORT :: RE: Reformatting and adding additional filler lines in syncsort

$
0
0
Author: Arun Raj
Posted: Thu Apr 05, 2018 6:52 pm (GMT 5.5)

Badbeef,

One thing you could do is to build a SYMNAMES data set by reading the 'file names data set', creating 4 symbols corresponding each name. Then use it in the next step.
_________________
Arun
----------------------------------------------------------------------------------------------------
Love is like an hourglass, with the heart filling up as the brain empties. -Jules Renard


SYNCSORT :: RE: Reformatting and adding additional filler lines in syncsort

$
0
0
Author: sergeyken
Posted: Thu Apr 05, 2018 8:16 pm (GMT 5.5)

AFAIU a quite flexible approach is required, isn't it?
SYNCSORT is not the best tool for doing this, but it's not a rocket science anyway.

Stage 1: using PARSE, WHEN=GROUP, and BUILD convert the input file
Code:
PUT 'FILEA.SOURCE.PLACE'  +       
    FILEA.DESTINATION.txt               
PUT 'FILEB.SOURCE.PLACE'  +       
    FILEB.DESTINATION.txt               

to its table-like equivalent:
Code:
FILEA.SOURCE.PLACE              FILEA.DESTINATION.txt               
FILEB.SOURCE.PLACE              FILEB.DESTINATION.txt               


Stage 2: Use some kind of a template to define the desired output file structure:
Code:
SIGNON ESF=YES CASE=YES
SUBMIT PROC=XXXXXXX                    -
&STEP=STEP1                           -
&FROMDSN=FILEA.SOURCE.PLACE -
&TOFILE='$$$PARAMETER$$$'
SUBMIT PROC=XXXXXXX                    -
&STEP=STEP2                           -
&FROMDSN=FILEB.SOURCE.PLACE       -
&TOFILE='$$$PARAMETER$$$'
SIGNOFF


Stage 3: Using PARSE, WHEN=GROUP, and BUILD insert the required 'key markers' into a working version of the template:
Code:
SIGNON ESF=YES CASE=YES
SUBMIT PROC=XXXXXXX                    -
&STEP=STEP1                           -
&FROMDSN=FILEA.SOURCE.PLACE -              FILEA.SOURCE.PLACE
&TOFILE='$$$PARAMETER$$$'                  FILEA.SOURCE.PLACE
SUBMIT PROC=XXXXXXX                    -
&STEP=STEP2                           -
&FROMDSN=FILEB.SOURCE.PLACE       -        FILEB.SOURCE.PLACE
&TOFILE='$$$PARAMETER$$$'                  FILEB.SOURCE.PLACE
SIGNOFF


Stage 4: Using JOINKEYS, PARSE, IFTHEN, and BUILD combine the table-like input, and updated template - replacing $$$PARAMETERS$$$ parts with joined column 2 from table-like input.
Code:
SIGNON ESF=YES CASE=YES
SUBMIT PROC=XXXXXXX                    -
&STEP=STEP1                           -
&FROMDSN=FILEA.SOURCE.PLACE -       
&TOFILE='FILEA.DESTINATION.txt'
SUBMIT PROC=XXXXXXX                    -
&STEP=STEP2                           -
&FROMDSN=FILEB.SOURCE.PLACE       -     
&TOFILE='FILEB.DESTINATION.txt'
SIGNOFF



For details on using SORT statements, and parameters, please, RTFM or search this forum.
_________________
Tyrannosaurus-REXX

SYNCSORT :: RE: Reformatting and adding additional filler lines in syncsort

$
0
0
Author: Rohit Umarjikar
Posted: Thu Apr 05, 2018 9:36 pm (GMT 5.5)

Code:
PUT 'FILEA.SOURCE.PLACE'  +       
     FILEA.DESTINATION.txt               
 PUT 'FILEB.SOURCE.PLACE'  +       
     FILEB.DESTINATION.txt

-Include only 1-4 = spaces
-Use RESIZE to place two records to each other
FILEA.DESTINATION.txt FILEB.DESTINATION.txt
Use JOINKEYS to Overlay, respective positions from DS1 to DS2.
_________________
Regards,
Rohit Umarjikar
A leader is one who knows the way, goes the way, and shows the way.

SYNCSORT :: Duplicate PARM on OUTFIL

$
0
0
Author: sancraig16
Subject: Duplicate PARM on OUTFIL
Posted: Thu Apr 05, 2018 10:25 pm (GMT 5.5)

I tried adding a 2nd WHEN=GROUP statement and job failed with DUPLICATE PARM . Should I do the 2nd GROUP in a separate SORT ?

Code:


SYSIN :
  INREC IFTHEN=(WHEN=GROUP,BEGIN=(13,7,CH,EQ,C'XXXXXXX'),
  END=(42,8,CH,EQ,C'YYYYYYYY'),
  PUSH=(70:22,23))
  OPTION COPY
  OUTFIL INCLUDE=(42,8,CH,EQ,C'YYYYYYYY',OR,
                  42,7,CH,EQ,C'ZZZZZZZ'),
        IFTHEN=(WHEN=GROUP,BEGIN=(47,7,CH,EQ,C'ZZZZZZZ'),
                END=(42,8,CH,EQ,C'YYYYYYYY'),
                PUSH=(100:47,24)),
         BUILD=(1,120),CONVERT
         *
WER813I  INSTALLATION OPTIONS IN DDT LOAD LIBRARY WILL BE USED
WER270A  OUTFIL STATEMENT  : DUPLICATE PARM FOUND
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE


SYNCSORT :: RE: Duplicate PARM on OUTFIL

$
0
0
Author: Arun Raj
Posted: Thu Apr 05, 2018 10:36 pm (GMT 5.5)

sancraig16,

Is this related to your other topic? Sample input and output records might help.

Not sure what you are trying to achieve, but did you try 'moving' your WHEN=GROUP to your existing INREC?
_________________
Arun
----------------------------------------------------------------------------------------------------
Love is like an hourglass, with the heart filling up as the brain empties. -Jules Renard

SYNCSORT :: RE: Duplicate PARM on OUTFIL

$
0
0
Author: sergeyken
Subject: Re: Duplicate PARM on OUTFIL
Posted: Thu Apr 05, 2018 10:44 pm (GMT 5.5)

sancraig16 wrote:
I tried adding a 2nd WHEN=GROUP statement and job failed with DUPLICATE PARM


1. There is no sign of any 2nd WHEN=GROUP parameter (not a statement) - ???

2. In the case if any IFTHEN used, no BUILD other than IFTHEN's subparameter is allowed.
_________________
Tyrannosaurus-REXX

SYNCSORT :: RE: Duplicate PARM on OUTFIL

$
0
0
Author: sancraig16
Posted: Thu Apr 05, 2018 10:50 pm (GMT 5.5)

It is different task which I am working on . My goal is to get XXXXXX, YYYYYYY and ZZZZZZZ on the same line. Using WHEN=GROUP , I was able to PUSH XXXXXX on records of YYYYYYY and ZZZZZZ. I am now trying a 2nd WHEN=GROUP to get them all on the same record.

Code:

       XXXXXXX
00000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000
                                    YYYYYYYY000000123
11111111111111111111111111111111111111111111111111111
                                    ZZZZZZZ0000004569
22222222222222222222222222222222222222222222222222222
       XXXXXXX
00000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000
                                    YYYYYYYY000000222
11111111111111111111111111111111111111111111111111111
                                    ZZZZZZZ0000008888
22222222222222222222222222222222222222222222222222222


SYNCSORT :: RE: Duplicate PARM on OUTFIL

$
0
0
Author: Arun Raj
Posted: Thu Apr 05, 2018 10:51 pm (GMT 5.5)

You can try adding the second WHEN=GROUP to your existing INREC.
_________________
Arun
----------------------------------------------------------------------------------------------------
Love is like an hourglass, with the heart filling up as the brain empties. -Jules Renard


SYNCSORT :: RE: Duplicate PARM on OUTFIL

$
0
0
Author: sancraig16
Subject: Re: Duplicate PARM on OUTFIL
Posted: Thu Apr 05, 2018 10:53 pm (GMT 5.5)

sergeyken wrote:
sancraig16 wrote:
I tried adding a 2nd WHEN=GROUP statement and job failed with DUPLICATE PARM


1. There is no sign of any 2nd WHEN=GROUP parameter (not a statement) - ???

2. In the case if any IFTHEN used, no BUILD other than IFTHEN's subparameter is allowed.


Not sure if I am following you . The 2nd WHEN=GROUP is right after the OUTFIL INCLUDE .

Are you saying IFTHEN and BUILD cannot go together?

SYNCSORT :: RE: Duplicate PARM on OUTFIL

$
0
0
Author: Arun Raj
Posted: Thu Apr 05, 2018 10:58 pm (GMT 5.5)

Quote:
The 2nd WHEN=GROUP is right after the OUTFIL INCLUDE .
Yes, I noticed that and hence asking you if you could modify like this (remove from OUTFIL and add to INREC).
Code:
SYSIN :
   INREC IFTHEN=(WHEN=GROUP,BEGIN=(13,7,CH,EQ,C'XXXXXXX'),
   END=(42,8,CH,EQ,C'YYYYYYYY'),
   PUSH=(70:22,23)),
         IFTHEN=(WHEN=GROUP,BEGIN=(....),
   END=(.....),
   PUSH=(...))
   OPTION COPY
....
...


Quote:
Are you saying IFTHEN and BUILD cannot go together?
No, I was not saying that, IFTHEN and BUILD/OVERLAY could go together but I think not a GROUP/PUSH and BUILD/OVERLAY. I cannot test with your product right now.
_________________
Arun
----------------------------------------------------------------------------------------------------
Love is like an hourglass, with the heart filling up as the brain empties. -Jules Renard

SYNCSORT :: RE: Duplicate PARM on OUTFIL

$
0
0
Author: sancraig16
Posted: Thu Apr 05, 2018 11:02 pm (GMT 5.5)

Arun Raj wrote:
You can try adding the second WHEN=GROUP to your existing INREC.


I should have thought about that. Thanks ! It works now.

SYNCSORT :: RE: Duplicate PARM on OUTFIL

$
0
0
Author: Arun Raj
Posted: Thu Apr 05, 2018 11:03 pm (GMT 5.5)

sancraig16 wrote:
Arun Raj wrote:
You can try adding the second WHEN=GROUP to your existing INREC.


I should have thought about that. Thanks ! It works now.
No problem! Glad I could be of some help.
_________________
Arun
----------------------------------------------------------------------------------------------------
Love is like an hourglass, with the heart filling up as the brain empties. -Jules Renard

IMS DB/DC :: RE: Unique IMS DB identifier

$
0
0
Author: Rohit Umarjikar
Posted: Thu Apr 05, 2018 11:26 pm (GMT 5.5)

Table Space, Database Name , schema named and table name should be a unique combination per DB2 subsystem.
Is that not what you want?
_________________
Regards,
Rohit Umarjikar
A leader is one who knows the way, goes the way, and shows the way.

COBOL Programming :: COBOL MVS options

$
0
0
Author: BiswajitDG
Subject: COBOL MVS options
Posted: Fri Apr 06, 2018 12:35 am (GMT 5.5)

We have a work in progress and as part of that we need to auto assign priority to access certain resource based on the class of the job that is running our cobol. Could not find class of the running job from the MVS control blocks. Is there any other way to do this or is this hidden somewhere in MVS blocks?

http://documentation.microfocus.com/help/index.jsp?topic=%2Fcom.microfocus.eclipse.infocenter.studee60ux%2FHCOMCMCBLKS005.html

COBOL Programming :: RE: COBOL MVS options

$
0
0
Author: Robert Sample
Posted: Fri Apr 06, 2018 1:49 am (GMT 5.5)

Is your site JES2 or JES3? This would impact the control blocks you need to review.

Does your site use JES-managed initiators or WLM-managed initiators? If your site uses WLM-managed initiators, then you CANNOT auto assign priority -- WLM will run jobs based on their service class.

This is the type of question you REALLY need to be asking your site support group since we don't work at your site and have no idea how it is set up.
_________________
TANSTAAFL

The first rule of code reuse is that the code needs to be worth re-using.

"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil." -- Donald Knuth


SYNCSORT :: RE: Duplicate PARM on OUTFIL

$
0
0
Author: sancraig16
Posted: Fri Apr 06, 2018 1:58 am (GMT 5.5)

I ran this SORT for large number of records and ran into an issue. In one set of records I do not have a matching BEGIN but do have the matching END . I was expecting the record to be omitted but it was included. In my case I did not have XXXXXXX but do have YYYYYYYY record . Anyway to exclude such occurrences?

SYNCSORT :: RE: Duplicate PARM on OUTFIL

$
0
0
Author: sergeyken
Subject: Re: Duplicate PARM on OUTFIL
Posted: Fri Apr 06, 2018 2:30 am (GMT 5.5)

sancraig16 wrote:
sergeyken wrote:
2. In the case if any IFTHEN used, no BUILD other than IFTHEN's subparameter is allowed.


Not sure if I am following you . The 2nd WHEN=GROUP is right after the OUTFIL INCLUDE .

Are you saying IFTHEN and BUILD cannot go together?


Either BUILD alone, as parameter of OUTFIL statement, or multiple IFTHEN with optional BUILD subparametrs as parts of IFTHENs are allowed.

Either
Code:
OUTFIL ...BUILD=(...)...

or
Code:
OUTFIL ...IFTHEN=(...,PUSH=(...)...),
       ...IFTHEN=(...,BUILD=(...)...),
       ...IFTHEN=(...,BUILD=(...)...),



BUILD, and IFTHEN are incompatible at the same level of parameters.
_________________
Tyrannosaurus-REXX

SYNCSORT :: RE: Duplicate PARM on OUTFIL

$
0
0
Author: Arun Raj
Posted: Fri Apr 06, 2018 6:05 am (GMT 5.5)

sancraig16 wrote:
I ran this SORT for large number of records and ran into an issue. In one set of records I do not have a matching BEGIN but do have the matching END . I was expecting the record to be omitted but it was included. In my case I did not have XXXXXXX but do have YYYYYYYY record . Anyway to exclude such occurrences?
Can you post an example that includes that scenario and any other situation that could possibly occur, and the expected output from it?

Now looking back at your sample data, you might want to push 'X' record and the 'Y' record to your 'Z' record and then in the output include the 'Z' record alone. I just realized you are not doing it that way.
_________________
Arun
----------------------------------------------------------------------------------------------------
Love is like an hourglass, with the heart filling up as the brain empties. -Jules Renard

COBOL Programming :: RE: COBOL MVS options

$
0
0
Author: steve-myers
Posted: Fri Apr 06, 2018 8:37 am (GMT 5.5)

As one level, Mr. Sample is correct, but he is simplifying the situation.

In MVS, there are three priorities
  1. A JES related workload selection priority.
  2. In MVS, an address space related selection priority that determines when an address space is selected for execution, relative to other address spaces.
  3. In MVS, when multiple tasks are running within an address space, a priority that determines the order in which the task is selected.
Once a job starts executing, the first priority cannot be altered. It's too late, anyway. In any event MVS workload management has pretty much taken over this task.

The second priority is pretty much determined by MVS workload management. A user job cannot alter or influence the priority. I don't really know if a user job can even determine what it is. MVS workload management attempts to maximize system operation based on rules defined by the system programmers. Roughly 30 years ago, IBM decided
  • The system programmers were mostly incompetent to do this. I'm not sure I disagree.
  • System activity changes too quickly for human intervention to make much difference. A human must determine there is a problem, figure out what can be done to correct the problem, and (hopefully) correct the problem. Here I agree.
In response, IBM built the present workload manager.

The third priority can be influenced by the user program. The only time this matters is when when the program is operating subtasks. In 50 years I've only tried this once, and I never knew if it mattered. I ran several subtasks. Most of the time each subtask was I/O bound, but there were periods when it was CPU intensive. Just before a subtask went CPU bound I dropped its relative priority, and raised it when it went I/O bound again. Like I said, I never knew if it really helped.

All Other Mainframe Topics :: RE: converting a mainframe file with ASA CC to word document

$
0
0
Author: Lynne Schuler
Posted: Fri Apr 06, 2018 9:57 am (GMT 5.5)

thank you all so much. I tried the syncsort, but you have to set up an HFS file, and I never do anything on the unix side. but I did set up some JCL with a path to create a file in my default unix directory.. but it didn't work. I probably set up the unix part wrong.

I tried to find a sample syncsort JCL somewhere to do this, but no luck.

However, I did look up XMITXP - a great utility written by Lionel Dyck. this also takes a mainframe file and can convert it to an RTF file (or html or pdf).

thanks again.
_________________
Lynne

Viewing all 8500 articles
Browse latest View live