Skip to content

Instantly share code, notes, and snippets.

View mainframed's full-sized avatar

Soldier of FORTRAN mainframed

View GitHub Profile
#!/bin/bash
# This output goes in to <whatever>.VTAMLST(A0TCP)
echo "[+] Creating 00 through 99 LUs for" $1
STRLENGTH=`echo -n $1 | wc -m`
if [ "$STRLENGTH" -ne "6" ] ; then
echo "[!] The name you entered ($1) not long enough."
echo "[!] Must be 6 characters long"
exit
fi
@mainframed
mainframed / tso_applid.sh
Created August 27, 2018 20:01
Add TSO applids
#!/bin/bash
for i in {11..99}; do
echo "A06TSO$i APPL AUTH=(NOACQ,NOBLOCK,PASS,NOTCAM,NVPACE,TSO,NOPO), X"
echo " EAS=1,ACBNAME=TSO00$i "
echo "*"
done
@mainframed
mainframed / ECHO.RX
Created October 16, 2018 01:15
Echo a socket
/* REXX */
/* Change port to user number */
/* i.e. EVIL21 set port to 55521 */
p = '46290'
mf_ip = '0.0.0.0'
n = "25"x
txt = ''
r = "READY"||n
s = SOCKET('INITIALIZE','DAEMON',2)
s = SOCKET('SOCKET')
!Add this to your x3270 profile in your home folder (~/.x3270pro)
x3270.model: 2
! First we set the color scheme to the name demo
x3270.colorScheme: demo
! Then we set the colors we need
! These colors were picked for the class
x3270.colorScheme.demo: \
black midnightBlue darkred brown \
darkGreen midnightblue darkgoldenrod black \
black midnightblue SaddleBrown purple \
@mainframed
mainframed / protall.clist
Created October 27, 2018 05:27
CLIST Example for KDE Developers (Protects all user accounts)
PROC 2 USER TOTAL
CONTROL NOCAPS
WRITE *** Protecting users &USER 1 to &USER &TOTAL
DO &COUNT = 1 TO &TOTAL
ALU &USER&COUNT NOPASS
END
WRITE *** DONE
//RACROUTE JOB (ACCT),
// ' ',
// CLASS=A,
// MSGCLASS=X,
// MSGLEVEL=(1,1),
// REGION=0M,
// NOTIFY=&SYSUID
//*
//* From David Spiegel 2016
//*
//<USERID> JOB (ACCT),
// ' ',
// CLASS=A,
// MSGCLASS=X,
// MSGLEVEL=(1,1),
// REGION=0M
//UNIXCMD EXEC PGM=BPXBATCH,REGION=800M
//STDPARM DD *
SH find . -type f -exec ls -s {} \; > /tmp/t
/*
@mainframed
mainframed / COMPILE.JCL
Created February 16, 2019 01:50
Used to compile HLASM in TEST mode so you can use TSO TEST
//SOF1C JOB (ASSY),'COMPILE IT',CLASS=A,MSGCLASS=Y,
// NOTIFY=&SYSUID,MSGLEVEL=(1,1)
//* Use this JCL to compile HLASM in TEST mode
//* So you can use TSO TEST to debug
// SET FILE=APFLISTC
//ASM EXEC PROC=HLASMCL,PARM.L=(TEST),PARM.C=(TEST)
//SYSIN DD DSN=SOF.ASM.SOURCE(&FILE),DISP=(SHR)
//C.SYSLIB DD DISP=SHR,DSN=SYS1.MACLIB
// DD DISP=SHR,DSN=SYS1.MODGEN
//L.SYSLMOD DD DSN=SOF.ASM.BIN(&FILE),DISP=(SHR)
#!/usr/bin/env python
import tweepy
import sys
# argument 1 is the tweet, argument 2 is the path to the image
def get_api(cfg):
auth = tweepy.OAuthHandler(cfg['consumer_key'], cfg['consumer_secret'])
auth.set_access_token(cfg['access_token'], cfg['access_token_secret'])
return tweepy.API(auth)
S.No Clist Command Its USE
1 &DATATYPE &DATATYPE is used to determine the data type of an expression.
2 &EVAL &EVAL forces numeric evaluation of the expression that is passed to the function.
3 &LASTCC The &LASTCC variable contains the return code from the last TSO command,subcommand, CLIST statement, or nested CLIST that was executed.
4 &LENGTH The &LENGTH function returns the number of bytes occupied by an expression or character string.
5 &MAXCC The &MAXCC variable contains the highest return code from any TSO command,subcommand, CLIST statement, or nested CLIST that was executed while the current CLIST is active.
6 &NRSTR The &NRSTR function defines a non-rescannable string.
7 &STR The &STR function is used to pass character data to a CLIST without any CLIST language evaluation being done on the data.
8 &SUBSTR The &SUBSTR function is used to extract a character string from within another character string. 
9 &SYS_VARIABLES TSO/E contains certain control variables which are available for use in CLISTs